I discovered an unfortunate commenting bug (Revo 2.0.8).
I have a chunk that returns a doc id. It looks approximately like this:
[[-comment]]
[[!$getFeaturedChildOf:notempty=`[[!$getRandomChildOf]]`]]
The return was always coming back with an extra space at the front, thusly: " 234"
I had tried the If snippet and the output filter, with the same result. I wrote an output modifier using php's trim function to strip the extra space, but it didn't work. Then I used php's ord function and found that what appeared on screen as a space was actually a bracket "[".
What seems to be happening is that the comment, or part of it, is being returned as part of the chunk output. But why does it appear as white space on screen?
By putting the comment on the same line as the output modifier code, the problem goes away, so perhaps there's something about a comment with a line return? And of course removing the comment altogether fixed my problem (which was that I wanted to use the doc id to build a url, which didn't like the space or whatever it was).
(Incidentally, the output modifier is about 60% faster in this case than the If snippet.)
Cheers!
[ed. note: drwagner13 last edited this post 12 years, 1 month ago.]