Hi Maciek,

The getAbsoluteContainerList method does a check on container definitions. It basically checks if the container list definition called "indexContainer1" has a parent container definition, in which case it refuses to load the container list.

The problem with sub container lists is that there are multiple instances of them on a single page, so I shouldn't be able to access them without going through their parent object.

Now if "indexContainer1" is indeed a "page level" container list, there must be some kind of problem in the database with the container definitions, or as you pointed out, with the implementation of the getAbsoluteContainer list method. There might be a problem (as I am looking into the code right now), if you have different definitions of indexContainer1 in different templates on your site. Is this the case ?

Regards,
  Serge Huber.

At 17:35 18.06.2004, you wrote:
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

- -- --- -----=[ serge.huber at jahia dot com ]=---- --- -- -
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company





Reply via email to