Dicheva, Darina wrote:
Hello,
I have installed xwiki 1.2 (MySql, Tomcat 5), and created a second blog following a suggestion in a previous postage to this list (by adding the $space variable to the blog macro). Everything seems to work just fine, but nevertheless I get error messages displayed on the Tomcat console, such as:
16:40:41,008 [http://iiscs.wssu.edu/xwiki/bin/view/Blog/] [http-80-Processor4] ERROR log.SimpleLog4JLogSystem - Left side ($bentrydoc.fullName) of '==' operation has null value. If a reference, it may not be in the context. Operation not possible. Blog.WebHome [line 20, column 28]
It seems that the error is in the Blog.Macros' line below (I edited the original line to include $space):
#if(($bentrydoc.fullName == $item)&& (!$space ||($space=="") || ($bentrydoc.getSpace()==$space)) )
Is it normal to get those kind of messages, and if not, is this a result of my modification, and how can I fix it?
Since I don't really know Velocity, any advice will be highly appreciated.
Thanks, Darina
Hi, The error is not cause by adding $space in there. I think this is an error in the original script, but it is not a severe one. You can fix it if you replace the line with: #if($bentrydoc && ($bentrydoc.fullName == $item) && (!$space || ($space=="") || ($bentrydoc.getSpace()==$space))) -- Sergiu Dumitriu http://purl.org/net/sergiu/