AbsoluteContainerList on homepage used on all pages with SINGLE_MANDATORY_TYPE attribute not accessible after import on new site --------------------------------------------------------------------------------------------------------------------------------
Key: JAHIA-3543 URL: http://www.jahia.net/jira/browse/JAHIA-3543 Project: Jahia Web Content Management Server (WCMS) Issue Type: Bug Components: Content Objects, Edition Pop-ups / Engines, XML Import / Export Affects Versions: WCM 5.0 SP3 Environment: Dev: Windows, JVM 1.5.0, Jahia 5.0.4, HSQLDB Test: Unix, JVM 1.5, Jahia 5.0.4, Oracle 9i Reporter: Pironet Benoit Priority: Blocker We use an absoluteContainerList with SINGLE_MANDATORY attribute to store the siteSettings. This containerList is called on each page. - This runs perfectly on DEV env. - We export the website (complete export via administration) - Information: The absoluteContainerList stored on the homepage is the very last part of the export xml file - We import the website (we don't navigate on the website until the end of the import) - The absoluteContainerList is present (We check using API), but a blank container is created in position 1 and our values from the import are in position 2. - html:actionMenu tag run for siteSettingsContainerList but none of both conainer display the actionMenu tag. - content tags doesn't find any container in the containerList. - if we remove the SINGLE_MANDATORY attribute, we see the "Add" option on the siteSettingsContainerList actionMenu tag and we can see in the engine that there is already the two container (one empty and one with our data). Here is the declaration of the container: <%@ page language="java" %> <content:declareContainerList name="siteSettingsContainer" bundleKey='REFIN' titleKey='siteSettingsContainerTitle' containerListType="<%=JahiaContainerDefinition.SINGLE_TYPE%>"> <content:declareContainer> <content:declareField name="webmasterEmail" type="SharedSmallText" bundleKey='REFIN' titleKey='webmasterEmail'/> <content:declareField name="searchMaxResultPerPage" type="Integer" bundleKey='REFIN' titleKey='searchMaxResultPerPage'/> <content:declareField name="searchMaxPageInIndex" type="Integer" bundleKey='REFIN' titleKey='searchMaxPageInIndex'/> </content:declareContainer> </content:declareContainerList> And the usage: <content:absoluteContainerList pageLevel="1" name="siteSettingsContainer" id="siteSettingsContainerList"> <content:container id="siteSettingsContainer"> <bean:define id="webmasterEmail" name="siteSettingsContainer" property='<%="field(webmasterEmail).value"%>'/> <bean:define id="searchMaxResultPerPage" name="siteSettingsContainer" property='<%="field(searchMaxResultPerPage).value"%>'/> <bean:define id="searchMaxPageInIndex" name="siteSettingsContainer" property='<%="field(searchMaxPageInIndex).value"%>'/> </content:container> </content:absoluteContainerList> We can check the presence of both container in the containerList using the code: try { Enumeration ssContainers = null; JahiaContainerList ssContainerList = jData.containers().getAbsoluteContainerList("siteSettingsContainer", jData.getProcessingContext().getSite().getHomePage().getID()); if(ssContainerList != null) { ssContainers = ssContainerList.getContainers(); out.println("FULLSIZE: " + ssContainerList.getFullSize()); boolean dataFound = false; while(ssContainers.hasMoreElements() && !dataFound) { try { JahiaContainer ssContainer = (JahiaContainer)ssContainers.nextElement(); if(ssContainer.getField("webmasterEmail") != null && ssContainer.getField("webmasterEmail").getValue() != null && !"".equals(ssContainer.getField("webmasterEmail").getValue())) { out.println("TROUVE"); dataFound = true; } else { out.println("PAS TROUVE"); } } catch(Exception e) { e.printStackTrace(); } } out.println("FIN"); } } catch(Exception e) { e.printStackTrace(); } Possible problem: -Jahia seems to execute an http request on a page when he finish the import on it. Does it finish the import of the homepage before calling any page ? -Bug in the import process -Bug in the actionMenu / content tags. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.jahia.net/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ jira_list mailing list jira_list@jahia.org http://lists.jahia.org/cgi-bin/mailman/listinfo/jira_list