U4-10469 - call to contentResource.GetByIds fails after upgrade to 7.7.1

Created by Kevin Jump 26 Sep 2017, 15:04:50 Updated by Sebastiaan Janssen 27 Sep 2017, 09:36:44

Duplicates: U4-10437

Relates to: U4-10433

Calls from custom controllers in the back office to contentResource.GetByIds - return blank results on a site that has been upgraded from 7.6.x to 7.7.1 - the same calls work on a blank install of Umbraco 7.7.1

Steps to reproduce.

  • Install umbraco 7.6.8 - test something that calls GetByIds() and get results.

  • upgrade site to Umbraco 7.7.1 (via nuget) - the calls then fail.

  • new install umbraco 7.7.1 and the calls work.

I know long term these calls will one day probably be obsoleted, and we should be using UDI values but at the moment it's inconsistent because it works on a direct install but not on a upgraded one.

Example Code that works on 7.6.8 and a fresh install of 7.7.1 but fail on a site upgraded from 7.6.8 to 7.1.1 ''(the Content IDs need to exist - they are hardwired for simplicity of code here)''

(function () { 'use strict'

function myLookupController(contentResource) {

    var vm = this;
    vm.ids = [1103, 1104];

    //////////////////

    contentResource.getByIds(vm.ids)
        .then(function (contentArray) {
            vm.nodes = contentArray;
            console.log(contentArray);
        });
}

angular.module('umbraco')
    .controller('myLookupController', myLookupController);

})();

Comments

Kevin Jump 27 Sep 2017, 07:33:47

Based on the empty listview issue (http://issues.umbraco.org/issue/U4-10437#) i think this is linked. If you remove your users from the migrated section access group then the call does return ids.


Kevin Jump 27 Sep 2017, 07:35:20

Same workaround - not sure if listview is calling same function underneath ?


Sebastiaan Janssen 27 Sep 2017, 09:36:35

Yeah, it's all about the permission problems. Sorry about that!


Priority: Normal

Type: Bug

State: Duplicate

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.7.1

Due in version:

Sprint:

Story Points:

Cycle: