[MAGNOLIA-1168] Document root is always "/" Created: 27/Oct/06  Updated: 02/Nov/06  Resolved: 31/Oct/06

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 3.0 RC3
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: david hickman Assignee: Sameer Charles
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, windows xp


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

We are upgrading the application from "Magnolia 3.0-rc2-SNAPSHOT" to "Magnolia-3.0-rc3". The path settings are completely ignored when the document tree is displayed. I am passing in parameter "path=documents" to display matching URL folders. But this completely ignored and it shows all the folders in the document tree. Also when I click on a folder, it does not consider the folder name/id, and shows up the parent directories again. Am I missing anything or anything has to be configured?



 Comments   
Comment by Philipp Bracher [ 31/Oct/06 ]

On a fresh installed RC4 I can browse the dms tree without any problems.

Comment by david hickman [ 31/Oct/06 ]

We upgraded our application from "Magnolia 3.0-rc2-SNAPSHOT" to "Magnolia-3.0-rc4".
Intially we get exception like this

ERROR info.magnolia.context.MgnlContext MgnlContext.java(getInstance:289) 31.10.2006 18:20:43 MgnlContext is not initialized, This could happen if the request does not go through magnolia default filters
ERROR info.magnolia.context.MgnlContext MgnlContext.java(getInstance:291) 31.10.2006 18:20:43 See : MgnlContext.setInstance(Content context)
ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mga3.0-rc4].[jsp] ApplicationDispatcher.java(invoke:712) 31.10.2006 18:20:43 Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: MgnlContext is not set for this thread
at info.magnolia.context.MgnlContext.getInstance(MgnlContext.java:292)
at info.magnolia.context.MgnlContext.getHierarchyManager(MgnlContext.java:110)
at info.magnolia.cms.gui.control.Tree.<init>(Tree.java:155)
at info.magnolia.module.dms.gui.DMSTreeControl.<init>(DMSTreeControl.java:44)
at info.magnolia.module.dms.DMSAdminTree.<init>(DMSAdminTree.java:53)
at com.xumak.handler.tree.AzulTreeHandler.<init>(AzulTreeHandler.java:22)
at org.apache.jsp.templates.ascs.templates.documentList.documentListComponent_jsp._jspService(documentListComponent_jsp.java:91)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at info.magnolia.cms.filters.MgnlVirtualUriFilter.redirect(MgnlVirtualUriFilter.java:109)
at info.magnolia.cms.filters.MgnlVirtualUriFilter.doFilter(MgnlVirtualUriFilter.java:77)
at info.magnolia.cms.filters.MagnoliaManagedFilter$CustomFilterChain.doFilter(MagnoliaManagedFilter.java:92)
at info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:66)
at info.magnolia.cms.filters.MagnoliaManagedFilter$CustomFilterChain.doFilter(MagnoliaManagedFilter.java:92)
at info.magnolia.cms.filters.MagnoliaManagedFilter.doFilter(MagnoliaManagedFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
ERROR info.magnolia.cms.filters.MgnlVirtualUriFilter MgnlVirtualUriFilter.java(redirect:112) 31.10.2006 18:20:43 Failed to forward to /templates/ascs/templates/documentList/documentListComponent.jsp - IllegalStateException:MgnlContext is not set for this thread

After adding code "MgnlContext.initAsWebContext(request);" to documentListComponent.jsp
we didn't get any errors
But still we are unable to traverse through the document tree
when i am trying to expand the root folders , it's showing root folders multiple times instead of showing child folders and documents
Am I missing anything or anything has to be configured?

Comment by david hickman [ 02/Nov/06 ]

Hi,

The issue is not yet resolved. Here are the details related to the configurations we made and the code we used. For further information about the issue please refer to the Support Case# Magnolia 1163

1. documentListComponent.jsp - This is the JSP Page which actually displays the Document Tree to the end user. Here is the code which we used in the page:

/*

  • Code added specifically for in Magnolia 3.0 rc3 version to overcome the "Context Not Set - defaulting to System Context" as specified by
  • Magnolia team
    */
    WebContext webContext = (WebContext) FactoryUtil.getInstance(WebContext.class);
    webContext.init(request);
    MgnlContext.setInstance(webContext);

// Previous Code that was working fine in Magnolia 3.0 rc2 version
request.setAttribute("title", "List of available Documents");
request.setAttribute("description", "Description");
AzulTreeHandler handler = new AzulTreeHandler(request, response);
handler.getHtml();

2. We created an Virtual URL Mapping Entry for the above file. Here are the details:

fromURI - /doclist.html
toURI - forward:/templates/ascs/templates/documentList/documentListComponent.jsp

3. In the home page we have an IFrame which is calling the above specified documentListcomponent.jsp page by using the above Virtual URI Mapping. Here is the code:
<iframe name="documentList" id="documentList"
src="${pageContext.request.contextPath}/doclist.html?path=documents"
scrolling="no" frameborder="0" style="height:100%"></iframe>

In the RC2 Version we used to pass the root folder name (that needs to be displayed) as a parameter ("path=documents") in the above specified IFrame code (in the src attribute). But in the rc3/rc4 version, the core classes are not recognizing this parameter ("path=documents") and instead of showing specific parent folder ("documents") all the root folders in the document management system are shown. Even when we try to expand a specific parent node its showing the parent node for multiple times.

FYI...
Here is the classes hirarchy:

  • Class AzulTree extends info.magnolia.cms.gui.control.Tree
  • Class AzulTreeConfig extends info.magnolia.module.dms.DMSAdminTreeConfig
  • Class AzulTreeHandler extends info.magnolia.module.dms.DMSAdminTree
  • Class AzulTreeControl extends AzulTree
Comment by Sameer Charles [ 02/Nov/06 ]

David,

we are not responsible for your code, use "Users list" for your questions
http://magnolia.sourceforge.net/30/lists/user-list.html

Generated at Mon Feb 12 03:24:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.