bug in getAbsoluteContainerList ?

Maciej Macowicz <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Hello,

We'are migrating from Jahia 3 to Jahia 4 (we use the latest release 
Jahia 4.0.4); on the
database resulting from such migration I noticed  the following (very 
strange) behavior:

1. On each page there is possibly the container list "indexContainer1"...

2. when trying to get this list on its origin page using taglibs 
<content:containerList name="indexContainer1" ... >
or the equivalent API call  
jData.containers().getContainerList("indexContainer1") -  everything 
works fine

3. when getting this list using the absolute addressing via tag 
<content:absoluteContainerList ...>
or API jData.containers().getAbsoluteContainerList("...") : the 
container is not loaded
and I get the error message "..." org.jahia.exceptions.JahiaException: 
Error while loading absolute container list, Cannot load a sub container 
list with this method ! 237
        at 
org.jahia.data.containers.JahiaContainerSet.getAbsoluteContainerList(JahiaContainerSet.java:1080)

4. Nevertheless, I CAN load this container list (I am sure it is there, 
it was used in Jahia v 3 templates) in a very undirect way:
// contentPage contains the page for which we want to load the container 
list "indexContainer1".
PageBean pb= new PageBean(contentPage.getPage(jData.getParamBean()), 
jData.getParamBean());
ContainerListBean indexContainer=  (ContainerListBean) 
pb1.getContainerLists().get("indexContainer1");
if (indexContainer!= null) {
    JahiaContainerList icl= indexContainer.getJahiaContainerList();
     // icl holds here what we should have obtained from the call to 
jData.containers().getAbsoluteContainerList(...)
}


I managed to solve this problem (in a very ugly way ;), but I cannot use 
taglibs in templates :(
Otherwise, do you think this is due to a corruption of the database 
after migration ?

Thank you, have a nice weekend -

-- 
MacieK
_______________________________________________________________
Dr. Maciej Macowicz               tel/fax. +4121 693-2258/-5500
DIT-DEV (MA) -> sur la carte http://plan.epfl.ch/?sciper=118352
Ecole Polytechnique Federale de Lausanne, 1015 Lausanne, Suisse
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.