[RESOLVED] Document.getContent() -> Empty response on some instances

Hello everyone,

I’m fairly new to xWiki. Our company is currently rolling out xWiki. Im building a groovy script to transform some data, which I built and tested on a local instance in docker.

Now I have a weird problem. When I run the script on our instances I get with the document.getContent() function an empty string back. Weirdly enough, it works on my local instance in docker.

They all run on the same version, I already checked that.
While testing, I also saw, that the getTitle() function also returns an empty string.

When i just print out the document object (xwiki.getDocument()) I get the name/space of the document.

Is there a problem or a fix? Or a explaination why its working on my local instance and not on the other ones? We have the same extensions installed etc.

Thanks for the help and support!
With kind regards
Louis

There’s no obvious explanation, I see no reason and it should work fine. You probably have some differences somewhere (in the page reference in which the script is located, or somewhere else).

Hi, yes i found the bug. I messed up the DocumentReference. Thank you!