However, when I publish this page, the value is always 0. And if I try to get() the first node from the slot, it will display correctly in a preview context, but fail during publishing.
Has anyone else experienced this problem, or (oh please!) know the solution?
Well I think it is more of trying to make sure it isn’t the easy stuff before troubleshooting further
In the url to preview the item in question, if there is a parameter set to “preview” and you change it to “public” do you get the same error? What about if you change your context from 0 to 301? If switching the context creates the problem, then you know that there is something going on with your location schemes…
Thanks to your suggestion, I figured out the problem. The page was published using Publish Now. This sets a sys_itemfilter of sitefolder. In testing the URL, if I change that to public, it works as expected.
The solution, I guess, is to avoid using Publish Now on templates that employ that getSlotContents function.
I’ve logged an internal Toolkit bug on this so that we can try to track this down [PSO-4 getSlotContent fails when item filter is set to Site Folder]. Can you give me the date and time and file size on the PSO Toolkit jar you are using?
Is there any update on this issue? We’ve recently upgraded to 7.1, and I’ve noticed that since then, I’m getting problems with a macro that uses this function. I hadn’t noticed it when we were on 6.52.
It’s quite a key macro and is used on a whole range of pages, so I’d rather not add additional assembly time by actually assembling a slot to see if it’s populated.