[opencms-dev] bug in the template provided : non-existing directory provokes error

Nicolas Delsaux nicolas.delsaux at online.fr
Fri Jun 6 15:50:02 CEST 2003

On Thu, 05 Jun 2003 13:34:08 +0200, Nicolas Delsaux 
<nicolas.delsaux at online.fr> wrote:

> I investigated a little, and found that it was due to my topfolder.
> As a default, this Java variable is positionned to be the /"locale"/ 
> directory (in my case, /fr/), which I haven't. And the use of this 
> directory in cms.getNavigation().getNavigationForResource(topfolder); 
> results in an exception, which prevents as a consequence the page from 
> being correctly displayed (and in fact, from being displayed at all). 
> Since I have not too much time, I cannot investigate further in the Java 
> code, but I'm convinced there is a lacking .exists() check somewhere.

I've instigated a little further, since this solution was only a 
workaround. in order to investigate, I've inserted many debug flags in the 
template-nav-top.jsp to see what was happening. At my own surprise, I 
discovered that --
63				nav = (CmsJspNavElement)i.next();
64				if (nav!=null && nav.isFolderLink()) {
was the responsible. Why ? Simply because sometimes, the nav element 
obtained is null. I then inserted the nav!=null test, which prevents the 
error to happen, but which also prevent the whole menu thing to be 
displayed. I begin to be really confuzed about that ;-)

> As a workaround, I've changed the topfolder to be root folder, since I'm 
> not able to add a folder to the root, even using the admin account.
> Can someone explain me why the admin user is not able to add or remove 
> folders or data from the root ?

As a remembrance, here is my file hierarchy :
- alkacon-documentation
- release
 + articles
- system
And of course, I would like to have a beautiful menu.
If someone from Alkacon who worked on this template could contact me (or 
the list, which is better, since I do not keep archives), I would be very 
glad to do all testing and modifications in order for it to work, provided 
I get the good ideas ;-) . Thanks

Nicolas Delsaux

More information about the opencms-dev mailing list