Search code examples
jsondrupal-7

Drupal JSON view not returning full results when not logged in as admin


Until today a JSON view I created some time ago was returning the correct results. However today it only returns the correct results when I am logged in as admin.

Results when am not logged in:

{"nodes":[]}

When I am logged in:

{"nodes":[{"node":{"event":"tally","w1":"","w2":"1","w3":"","w4":"","w5":"3","w6":"1","w7":"1","w8":"1","w9":"","w10":"3","w11":"1","w12":"","w13":"2","w14":"3","w15":"","w16":"2","w17":"2","w18":"6","w19":"2","w20":"9","w21":"6","w22":"3","w23":"","w24":"","w25":"1","w26":"","w27":"7","w28":"4","w29":"3","w30":"5","w31":"1","w32":"2","w33":"1","w34":"1","w35":"","w36":"2","w37":"1","w38":"","w39":"","w40":"","w41":"","w42":"","w43":"","w44":""}},{"node":{"event":"tally","w1":"","w2":"1","w3":"","w4":"1","w5":"","w6":"","w7":"","w8":"","w9":"","w10":"","w11":"","w12":"","w13":"","w14":"1","w15":"","w16":"1","w17":"","w18":"1","w19":"","w20":"1","w21":"","w22":"1","w23":"","w24":"","w25":"","w26":"","w27":"2","w28":"","w29":"1","w30":"1","w31":"3","w32":"","w33":"","w34":"","w35":"","w36":"1","w37":"","w38":"","w39":"","w40":"","w41":"1","w42":"1","w43":"","w44":""}},{"node":{"event":"tally","w1":"","w2":"","w3":"","w4":"","w5":"2","w6":"","w7":"","w8":"2","w9":"1","w10":"1","w11":"","w12":"","w13":"4","w14":"1","w15":"","w16":"","w17":"1","w18":"2","w19":"","w20":"5","w21":"","w22":"2","w23":"1","w24":"","w25":"","w26":"","w27":"1","w28":"","w29":"","w30":"","w31":"","w32":"2","w33":"","w34":"","w35":"","w36":"","w37":"","w38":"1","w39":"","w40":"","w41":"","w42":"","w43":"","w44":""}},{"node":{"event":"tally","w1":"4","w2":"14","w3":"44","w4":"28","w5":"87","w6":"235","w7":"4","w8":"35","w9":"8","w10":"14","w11":"21","w12":"14","w13":"88","w14":"62","w15":"18","w16":"17","w17":"20","w18":"75","w19":"54","w20":"76","w21":"41","w22":"30","w23":"22","w24":"13","w25":"17","w26":"12","w27":"59","w28":"55","w29":"47","w30":"120","w31":"38","w32":"51","w33":"18","w34":"7","w35":"11","w36":"25","w37":"9","w38":"11","w39":"3","w40":"3","w41":"5","w42":"5","w43":"13","w44":"6"}}]}

Is there some permission problem? The underlying nodes are visible to the public.


Solution

  • This was caused by using the node access module which incorrectly made the underlying nodes not accessible by anonymous users. And I was incorrect is saying that the underlying nodes were visible.