getParentIds() operates only on the current Context as it depends on the Context cache file. There is a feature request to improve this and allow access across contexts, but it is not currently possible.
Essentially when a document is loaded in the manager not all placeholders and variables get set. So calls that work fine in the front end will not work in the backend.
I had to write a separate snippet that was called from TV using @EVAL binding.