|
View:
New views
18 Messages
—
Rating Filter:
Alert me
|
|
|
Sitemesh integration problemI have added magnolia onto an existing web app so that it can control a part of the site. The site contains other applications as well (blog, forum etc) and so Sitemesh is used for decoration. I have added SiteMesh to the Magnolia instances and it works perfectly for the 'create' pages in AdminCentral and also for the public instance. I have not been successful in getting SiteMesh to decorate the actual AdminCentral itself though (either public or author) and can't think of any reason why. The SiteMesh decorator is simply: <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> <pattern>/*</pattern> </decorator> Does anyone have any suggestions or has can say they have successfully managed to decorate AdminCentral? ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemHi Gavin, Any specifics on what the problem(s) is/are ? What are you trying to achieve specifically ? I suppose you've noticed the admincentral is built with frames.. and I seem to remember Sitemesh had frame-specific features/configuration, did you check that ? -g On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: > > I have added magnolia onto an existing web app so that it can > control a > part of the site. The site contains other applications as well (blog, > forum etc) and so Sitemesh is used for decoration. I have added > SiteMesh > to the Magnolia instances and it works perfectly for the 'create' > pages > in AdminCentral and also for the public instance. I have not been > successful in getting SiteMesh to decorate the actual AdminCentral > itself though (either public or author) and can't think of any reason > why. The SiteMesh decorator is simply: > > <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> > <pattern>/*</pattern> > </decorator> > > Does anyone have any suggestions or has can say they have successfully > managed to decorate AdminCentral? > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemThanks for taking the time to reply. I am trying to get AdminCentral decorated with SiteMesh. Currently AdminCentral is not decorated at all. I took a look at the source and see that past the login screen a single iframe is used. However, the login screen does not seem to use frames and it still is not decorated. I added the following to my sitemesh.xml file: <mapper class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> <param name="decorator" value="prosoc-cms-admin" /> </mapper> Where 'prosoc-cms-admin' is the name of the decorator in the decorator.xml file. My web.xml uses: <filter> <filter-name>sitemesh</filter-name> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> </filter> <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> I am not sure why AdminCentral does not get decorated. Any suggestions are certainly welcome. Grégory Joseph wrote: > > Hi Gavin, > > Any specifics on what the problem(s) is/are ? What are you trying to > achieve specifically ? I suppose you've noticed the admincentral is > built with frames.. and I seem to remember Sitemesh had frame-specific > features/configuration, did you check that ? > > -g > > > On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: > >> >> I have added magnolia onto an existing web app so that it can control a >> part of the site. The site contains other applications as well (blog, >> forum etc) and so Sitemesh is used for decoration. I have added SiteMesh >> to the Magnolia instances and it works perfectly for the 'create' pages >> in AdminCentral and also for the public instance. I have not been >> successful in getting SiteMesh to decorate the actual AdminCentral >> itself though (either public or author) and can't think of any reason >> why. The SiteMesh decorator is simply: >> >> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >> <pattern>/*</pattern> >> </decorator> >> >> Does anyone have any suggestions or has can say they have successfully >> managed to decorate AdminCentral? >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemIs your sitemesh filter before or after Magnolia's? This might be due to how requests that end up in the admincentral servlets treat the filter chain - can you try to see if /.magnolia/trees/website.html gets decorated, for example ? Or a simpler page such as /.magnolia/ pages/configuration.html ? The fact that the login form does not get decorated might be due to the fact that sitemesh treats pages differently depending on the http response code ? (i really don't know if it does, just wild guessing) -g On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: > > Thanks for taking the time to reply. > > I am trying to get AdminCentral decorated with SiteMesh. Currently > AdminCentral is not decorated at all. I took a look at the source and > see that past the login screen a single iframe is used. However, the > login screen does not seem to use frames and it still is not > decorated. > I added the following to my sitemesh.xml file: > > <mapper > class > ="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> > <param name="decorator" value="prosoc-cms-admin" /> > </mapper> > > Where 'prosoc-cms-admin' is the name of the decorator in the > decorator.xml file. My web.xml uses: > > <filter> > <filter-name>sitemesh</filter-name> > <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</ > filter-class> > </filter> > > <filter-mapping> > <filter-name>sitemesh</filter-name> > <url-pattern>/*</url-pattern> > <dispatcher>REQUEST</dispatcher> > <dispatcher>FORWARD</dispatcher> > </filter-mapping> > > I am not sure why AdminCentral does not get decorated. Any suggestions > are certainly welcome. > > > > Grégory Joseph wrote: >> >> Hi Gavin, >> >> Any specifics on what the problem(s) is/are ? What are you trying to >> achieve specifically ? I suppose you've noticed the admincentral is >> built with frames.. and I seem to remember Sitemesh had frame- >> specific >> features/configuration, did you check that ? >> >> -g >> >> >> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >> >>> >>> I have added magnolia onto an existing web app so that it can >>> control a >>> part of the site. The site contains other applications as well >>> (blog, >>> forum etc) and so Sitemesh is used for decoration. I have added >>> SiteMesh >>> to the Magnolia instances and it works perfectly for the 'create' >>> pages >>> in AdminCentral and also for the public instance. I have not been >>> successful in getting SiteMesh to decorate the actual AdminCentral >>> itself though (either public or author) and can't think of any >>> reason >>> why. The SiteMesh decorator is simply: >>> >>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>> <pattern>/*</pattern> >>> </decorator> >>> >>> Does anyone have any suggestions or has can say they have >>> successfully >>> managed to decorate AdminCentral? >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- >> >> >> > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemI had the SiteMesh filter after the Magnolia filter but if I move it in front I get some partial success. The decorator is applied but there is an error: java.lang.IllegalStateException: MgnlContext is not set for this thread and the login screen loads with parts of the decorator applied but most of it is missing. If I then login I get the following shown in Firefox: Content Encoding Error The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. I have not been successful in turning off compression in Magnolia to see if that solves this second problem. I have tried to delete the gzip nodes from: Config => server => filters => gzip Config => server => filters => gzip => bypasses => contentAllowed => allowed Config => modules => cache =>config => compression => voters =>contentType => allowed But the content still came out with gzip compression. The server does not have compression enabled so I have no idea where it comes from. Grégory Joseph wrote: > > Is your sitemesh filter before or after Magnolia's? This might be due to > how requests that end up in the admincentral servlets treat the filter > chain - can you try to see if /.magnolia/trees/website.html gets > decorated, for example ? Or a simpler page such as > /.magnolia/pages/configuration.html ? > > The fact that the login form does not get decorated might be due to the > fact that sitemesh treats pages differently depending on the http > response code ? (i really don't know if it does, just wild guessing) > > -g > > On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: > >> >> Thanks for taking the time to reply. >> >> I am trying to get AdminCentral decorated with SiteMesh. Currently >> AdminCentral is not decorated at all. I took a look at the source and >> see that past the login screen a single iframe is used. However, the >> login screen does not seem to use frames and it still is not decorated. >> I added the following to my sitemesh.xml file: >> >> <mapper >> class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >> <param name="decorator" value="prosoc-cms-admin" /> >> </mapper> >> >> Where 'prosoc-cms-admin' is the name of the decorator in the >> decorator.xml file. My web.xml uses: >> >> <filter> >> <filter-name>sitemesh</filter-name> >> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> >> >> </filter> >> >> <filter-mapping> >> <filter-name>sitemesh</filter-name> >> <url-pattern>/*</url-pattern> >> <dispatcher>REQUEST</dispatcher> >> <dispatcher>FORWARD</dispatcher> >> </filter-mapping> >> >> I am not sure why AdminCentral does not get decorated. Any suggestions >> are certainly welcome. >> >> >> >> Grégory Joseph wrote: >>> >>> Hi Gavin, >>> >>> Any specifics on what the problem(s) is/are ? What are you trying to >>> achieve specifically ? I suppose you've noticed the admincentral is >>> built with frames.. and I seem to remember Sitemesh had frame-specific >>> features/configuration, did you check that ? >>> >>> -g >>> >>> >>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>> >>>> >>>> I have added magnolia onto an existing web app so that it can control a >>>> part of the site. The site contains other applications as well (blog, >>>> forum etc) and so Sitemesh is used for decoration. I have added >>>> SiteMesh >>>> to the Magnolia instances and it works perfectly for the 'create' pages >>>> in AdminCentral and also for the public instance. I have not been >>>> successful in getting SiteMesh to decorate the actual AdminCentral >>>> itself though (either public or author) and can't think of any reason >>>> why. The SiteMesh decorator is simply: >>>> >>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>> <pattern>/*</pattern> >>>> </decorator> >>>> >>>> Does anyone have any suggestions or has can say they have successfully >>>> managed to decorate AdminCentral? >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >>> >>> >>> >> >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemYou can completely drop the gzip filter node if you want (/server/ filters/gzip) Is your decorator a Magnolia page too ? Mind sending a complete stacktrace (in attachment) ? -g On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: > > I had the SiteMesh filter after the Magnolia filter but if I move it > in > front I get some partial success. The decorator is applied but there > is > an error: > > java.lang.IllegalStateException: MgnlContext is not set for this > thread > > and the login screen loads with parts of the decorator applied but > most > of it is missing. If I then login I get the following shown in > Firefox: > > Content Encoding Error > The page you are trying to view cannot be shown because it uses an > invalid or unsupported form of compression. > The page you are trying to view cannot be shown because it uses an > invalid or unsupported form of compression. > > I have not been successful in turning off compression in Magnolia to > see > if that solves this second problem. I have tried to delete the gzip > nodes from: > > Config => server => filters => gzip > > Config => server => filters => gzip => bypasses => contentAllowed => > allowed > > Config => modules => cache =>config => compression => voters > =>contentType => allowed > > But the content still came out with gzip compression. The server does > not have compression enabled so I have no idea where it comes from. > > > > > > > > > > > Grégory Joseph wrote: >> >> Is your sitemesh filter before or after Magnolia's? This might be >> due to >> how requests that end up in the admincentral servlets treat the >> filter >> chain - can you try to see if /.magnolia/trees/website.html gets >> decorated, for example ? Or a simpler page such as >> /.magnolia/pages/configuration.html ? >> >> The fact that the login form does not get decorated might be due to >> the >> fact that sitemesh treats pages differently depending on the http >> response code ? (i really don't know if it does, just wild guessing) >> >> -g >> >> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >> >>> >>> Thanks for taking the time to reply. >>> >>> I am trying to get AdminCentral decorated with SiteMesh. Currently >>> AdminCentral is not decorated at all. I took a look at the source >>> and >>> see that past the login screen a single iframe is used. However, the >>> login screen does not seem to use frames and it still is not >>> decorated. >>> I added the following to my sitemesh.xml file: >>> >>> <mapper >>> class >>> ="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>> <param name="decorator" value="prosoc-cms-admin" /> >>> </mapper> >>> >>> Where 'prosoc-cms-admin' is the name of the decorator in the >>> decorator.xml file. My web.xml uses: >>> >>> <filter> >>> <filter-name>sitemesh</filter-name> >>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</ >>> filter-class> >>> >>> </filter> >>> >>> <filter-mapping> >>> <filter-name>sitemesh</filter-name> >>> <url-pattern>/*</url-pattern> >>> <dispatcher>REQUEST</dispatcher> >>> <dispatcher>FORWARD</dispatcher> >>> </filter-mapping> >>> >>> I am not sure why AdminCentral does not get decorated. Any >>> suggestions >>> are certainly welcome. >>> >>> >>> >>> Grégory Joseph wrote: >>>> >>>> Hi Gavin, >>>> >>>> Any specifics on what the problem(s) is/are ? What are you trying >>>> to >>>> achieve specifically ? I suppose you've noticed the admincentral is >>>> built with frames.. and I seem to remember Sitemesh had frame- >>>> specific >>>> features/configuration, did you check that ? >>>> >>>> -g >>>> >>>> >>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>> >>>>> >>>>> I have added magnolia onto an existing web app so that it can >>>>> control a >>>>> part of the site. The site contains other applications as well >>>>> (blog, >>>>> forum etc) and so Sitemesh is used for decoration. I have added >>>>> SiteMesh >>>>> to the Magnolia instances and it works perfectly for the >>>>> 'create' pages >>>>> in AdminCentral and also for the public instance. I have not been >>>>> successful in getting SiteMesh to decorate the actual AdminCentral >>>>> itself though (either public or author) and can't think of any >>>>> reason >>>>> why. The SiteMesh decorator is simply: >>>>> >>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>> <pattern>/*</pattern> >>>>> </decorator> >>>>> >>>>> Does anyone have any suggestions or has can say they have >>>>> successfully >>>>> managed to decorate AdminCentral? >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@magnolia- >>>>> cms.com> >>>>> ---------------------------------------------------------------- >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>>> >>>> >>>> >>> >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- >> >> >> > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemI am sorry, I just realised that I did not fully reply to your questions. I have now managed to disable the compression in Magnolia. The /.magnolia/pages/configuration.html does get decorated as does /.magnolia/trees/website.html but website.html does not display any of the web pages. It is as if the JavaScript is not running but I can access it at: /.magnolia/pages/javascript.js .resources/admin-js/dialogs/dialogs.js clicking a button such as 'New page' gives the error in the JavaScript console: Error: mgnlFunctionBar is undefined Source file: javascript:mgnlFunctionBar.clicked%20('new') Line: 1 This is the only time a JavaScript error is thrown. Grégory Joseph wrote: > > Is your sitemesh filter before or after Magnolia's? This might be due to > how requests that end up in the admincentral servlets treat the filter > chain - can you try to see if /.magnolia/trees/website.html gets > decorated, for example ? Or a simpler page such as > /.magnolia/pages/configuration.html ? > > The fact that the login form does not get decorated might be due to the > fact that sitemesh treats pages differently depending on the http > response code ? (i really don't know if it does, just wild guessing) > > -g > > On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: > >> >> Thanks for taking the time to reply. >> >> I am trying to get AdminCentral decorated with SiteMesh. Currently >> AdminCentral is not decorated at all. I took a look at the source and >> see that past the login screen a single iframe is used. However, the >> login screen does not seem to use frames and it still is not decorated. >> I added the following to my sitemesh.xml file: >> >> <mapper >> class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >> <param name="decorator" value="prosoc-cms-admin" /> >> </mapper> >> >> Where 'prosoc-cms-admin' is the name of the decorator in the >> decorator.xml file. My web.xml uses: >> >> <filter> >> <filter-name>sitemesh</filter-name> >> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> >> >> </filter> >> >> <filter-mapping> >> <filter-name>sitemesh</filter-name> >> <url-pattern>/*</url-pattern> >> <dispatcher>REQUEST</dispatcher> >> <dispatcher>FORWARD</dispatcher> >> </filter-mapping> >> >> I am not sure why AdminCentral does not get decorated. Any suggestions >> are certainly welcome. >> >> >> >> Grégory Joseph wrote: >>> >>> Hi Gavin, >>> >>> Any specifics on what the problem(s) is/are ? What are you trying to >>> achieve specifically ? I suppose you've noticed the admincentral is >>> built with frames.. and I seem to remember Sitemesh had frame-specific >>> features/configuration, did you check that ? >>> >>> -g >>> >>> >>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>> >>>> >>>> I have added magnolia onto an existing web app so that it can control a >>>> part of the site. The site contains other applications as well (blog, >>>> forum etc) and so Sitemesh is used for decoration. I have added >>>> SiteMesh >>>> to the Magnolia instances and it works perfectly for the 'create' pages >>>> in AdminCentral and also for the public instance. I have not been >>>> successful in getting SiteMesh to decorate the actual AdminCentral >>>> itself though (either public or author) and can't think of any reason >>>> why. The SiteMesh decorator is simply: >>>> >>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>> <pattern>/*</pattern> >>>> </decorator> >>>> >>>> Does anyone have any suggestions or has can say they have successfully >>>> managed to decorate AdminCentral? >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >>> >>> >>> >> >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemSo I assume the js page you've mentioned isn't decorated (or you'd have realized something was wrong). Maybe check the neighbor thread ("safari 4"), where Joshua mentions a few js files that are apparently not served with the proper mime-type; maybe Sitemesh decorates those, causing a whole lot of trouble. Depending on your decorator/configuration, it might also be that Sitemesh tries to reorganize the script tags, for instance. If I remember correctly from when I used it before, it's sort of its default behaviour, because you'll usually want to insert stuff in the <head> tags. Can you disable that? Or bypass it altogether for the whole /.magnolia and /.resources, for instance ? I'm not sure you've explained why you wanted to decorate the adminCentral in the first place (although I'd be curious to make this work, it might be interesting the know the use case too;)) -g On Jun 16, 2009, at 11:03 PM, Gavin Donald wrote: > > I am sorry, I just realised that I did not fully reply to your > questions. I have now managed to disable the compression in Magnolia. > The /.magnolia/pages/configuration.html does get decorated as does > /.magnolia/trees/website.html but website.html does not display any of > the web pages. It is as if the JavaScript is not running but I can > access it at: > > /.magnolia/pages/javascript.js > .resources/admin-js/dialogs/dialogs.js > > clicking a button such as 'New page' gives the error in the JavaScript > console: > > Error: mgnlFunctionBar is undefined > Source file: javascript:mgnlFunctionBar.clicked%20('new') > Line: 1 > > This is the only time a JavaScript error is thrown. > > > > > Grégory Joseph wrote: >> >> Is your sitemesh filter before or after Magnolia's? This might be >> due to >> how requests that end up in the admincentral servlets treat the >> filter >> chain - can you try to see if /.magnolia/trees/website.html gets >> decorated, for example ? Or a simpler page such as >> /.magnolia/pages/configuration.html ? >> >> The fact that the login form does not get decorated might be due to >> the >> fact that sitemesh treats pages differently depending on the http >> response code ? (i really don't know if it does, just wild guessing) >> >> -g >> >> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >> >>> >>> Thanks for taking the time to reply. >>> >>> I am trying to get AdminCentral decorated with SiteMesh. Currently >>> AdminCentral is not decorated at all. I took a look at the source >>> and >>> see that past the login screen a single iframe is used. However, the >>> login screen does not seem to use frames and it still is not >>> decorated. >>> I added the following to my sitemesh.xml file: >>> >>> <mapper >>> class >>> ="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>> <param name="decorator" value="prosoc-cms-admin" /> >>> </mapper> >>> >>> Where 'prosoc-cms-admin' is the name of the decorator in the >>> decorator.xml file. My web.xml uses: >>> >>> <filter> >>> <filter-name>sitemesh</filter-name> >>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</ >>> filter-class> >>> >>> </filter> >>> >>> <filter-mapping> >>> <filter-name>sitemesh</filter-name> >>> <url-pattern>/*</url-pattern> >>> <dispatcher>REQUEST</dispatcher> >>> <dispatcher>FORWARD</dispatcher> >>> </filter-mapping> >>> >>> I am not sure why AdminCentral does not get decorated. Any >>> suggestions >>> are certainly welcome. >>> >>> >>> >>> Grégory Joseph wrote: >>>> >>>> Hi Gavin, >>>> >>>> Any specifics on what the problem(s) is/are ? What are you trying >>>> to >>>> achieve specifically ? I suppose you've noticed the admincentral is >>>> built with frames.. and I seem to remember Sitemesh had frame- >>>> specific >>>> features/configuration, did you check that ? >>>> >>>> -g >>>> >>>> >>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>> >>>>> >>>>> I have added magnolia onto an existing web app so that it can >>>>> control a >>>>> part of the site. The site contains other applications as well >>>>> (blog, >>>>> forum etc) and so Sitemesh is used for decoration. I have added >>>>> SiteMesh >>>>> to the Magnolia instances and it works perfectly for the >>>>> 'create' pages >>>>> in AdminCentral and also for the public instance. I have not been >>>>> successful in getting SiteMesh to decorate the actual AdminCentral >>>>> itself though (either public or author) and can't think of any >>>>> reason >>>>> why. The SiteMesh decorator is simply: >>>>> >>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>> <pattern>/*</pattern> >>>>> </decorator> >>>>> >>>>> Does anyone have any suggestions or has can say they have >>>>> successfully >>>>> managed to decorate AdminCentral? >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@magnolia- >>>>> cms.com> >>>>> ---------------------------------------------------------------- >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>>> >>>> >>>> >>> >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- >> >> >> > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemGavin, Something hit me: your decorator jsp itself might be going through the Magnolia filters (by default, it's mapped to / and with dispatchers on request, forward AND include) - maybe try adding a bypass for it in the global bypasses at /server/filters/bypasses ? -g On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: > > I had the SiteMesh filter after the Magnolia filter but if I move it > in > front I get some partial success. The decorator is applied but there > is > an error: > > java.lang.IllegalStateException: MgnlContext is not set for this > thread > > and the login screen loads with parts of the decorator applied but > most > of it is missing. If I then login I get the following shown in > Firefox: > > Content Encoding Error > The page you are trying to view cannot be shown because it uses an > invalid or unsupported form of compression. > The page you are trying to view cannot be shown because it uses an > invalid or unsupported form of compression. > > I have not been successful in turning off compression in Magnolia to > see > if that solves this second problem. I have tried to delete the gzip > nodes from: > > Config => server => filters => gzip > > Config => server => filters => gzip => bypasses => contentAllowed => > allowed > > Config => modules => cache =>config => compression => voters > =>contentType => allowed > > But the content still came out with gzip compression. The server does > not have compression enabled so I have no idea where it comes from. > > > > > > > > > > > Grégory Joseph wrote: >> >> Is your sitemesh filter before or after Magnolia's? This might be >> due to >> how requests that end up in the admincentral servlets treat the >> filter >> chain - can you try to see if /.magnolia/trees/website.html gets >> decorated, for example ? Or a simpler page such as >> /.magnolia/pages/configuration.html ? >> >> The fact that the login form does not get decorated might be due to >> the >> fact that sitemesh treats pages differently depending on the http >> response code ? (i really don't know if it does, just wild guessing) >> >> -g >> >> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >> >>> >>> Thanks for taking the time to reply. >>> >>> I am trying to get AdminCentral decorated with SiteMesh. Currently >>> AdminCentral is not decorated at all. I took a look at the source >>> and >>> see that past the login screen a single iframe is used. However, the >>> login screen does not seem to use frames and it still is not >>> decorated. >>> I added the following to my sitemesh.xml file: >>> >>> <mapper >>> class >>> ="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>> <param name="decorator" value="prosoc-cms-admin" /> >>> </mapper> >>> >>> Where 'prosoc-cms-admin' is the name of the decorator in the >>> decorator.xml file. My web.xml uses: >>> >>> <filter> >>> <filter-name>sitemesh</filter-name> >>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</ >>> filter-class> >>> >>> </filter> >>> >>> <filter-mapping> >>> <filter-name>sitemesh</filter-name> >>> <url-pattern>/*</url-pattern> >>> <dispatcher>REQUEST</dispatcher> >>> <dispatcher>FORWARD</dispatcher> >>> </filter-mapping> >>> >>> I am not sure why AdminCentral does not get decorated. Any >>> suggestions >>> are certainly welcome. >>> >>> >>> >>> Grégory Joseph wrote: >>>> >>>> Hi Gavin, >>>> >>>> Any specifics on what the problem(s) is/are ? What are you trying >>>> to >>>> achieve specifically ? I suppose you've noticed the admincentral is >>>> built with frames.. and I seem to remember Sitemesh had frame- >>>> specific >>>> features/configuration, did you check that ? >>>> >>>> -g >>>> >>>> >>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>> >>>>> >>>>> I have added magnolia onto an existing web app so that it can >>>>> control a >>>>> part of the site. The site contains other applications as well >>>>> (blog, >>>>> forum etc) and so Sitemesh is used for decoration. I have added >>>>> SiteMesh >>>>> to the Magnolia instances and it works perfectly for the >>>>> 'create' pages >>>>> in AdminCentral and also for the public instance. I have not been >>>>> successful in getting SiteMesh to decorate the actual AdminCentral >>>>> itself though (either public or author) and can't think of any >>>>> reason >>>>> why. The SiteMesh decorator is simply: >>>>> >>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>> <pattern>/*</pattern> >>>>> </decorator> >>>>> >>>>> Does anyone have any suggestions or has can say they have >>>>> successfully >>>>> managed to decorate AdminCentral? >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@magnolia- >>>>> cms.com> >>>>> ---------------------------------------------------------------- >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>>> >>>> >>>> >>> >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- >> >> >> > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemThanks for the additional ideas. I have tried them as far as I could and could not get it to work. The use case is that the site has several web applications running on it (Apache Roller , MVNForum, Magnolia as well as a custom core that provides site specific facilities). The public and admin sections of each of those application is SiteMesh decorated and so it would keep everything looking the same if the Magnolia AdminCentral was also decorated. The decorators also contain the shared navigation sections and so if a user enters AdminCentral they loose all the navigation elements that let them easily move between the different applications. I added the following: Server/filters/bypasses Content-node: sitemesh-decorator data-node: class => info.magnploa.voting.voters.URIStartsWithVoter data-node: pattern: => /prosoc-view/decorator I have looked at the source in the browser and then called each of the JS files in turn. Non of them are decorated and all are present including the: /.magnolia/pages/javascript.js I mention that file specifically because when SiteMesh is active and I call /magnolia/trees/website.html I get an error in the JavaScript console saying that 'MgnlTextField' could not be found. This JavaScript call is called from near the bottom of website.html and the function is defined in javascript.js. I have added: <excludes> <pattern>*.js</pattern> </excludes> to the decorators.xml file. You mentioned: "Depending on your decorator/configuration, it might also be that Sitemesh tries to reorganize the script tags, for instance. If I remember correctly from when I used it before, it's sort of its default behaviour, because you'll usually want to insert stuff in the <head> tags. Can you disable that? Or bypass it altogether for the whole /.magnolia and /.resources, for instance ?" but I didn't really understand how to do that. When I put the SiteMesh filter before the magnolia filter I frequently get: MgnlContext is not set for this thread which comes from info.magnolia.context.MgnlContext (~ line 295) which is saying that the ThreadLocal does not contain the info.magnolia.context.Context. I am not really sure what to do about this as if I put the SiteMesh filter after the Magnolia filter then SiteMesh is ignored for AdminCentral (but it does decorate the pages managed by Magnolia). If you have any other ideas then I would be happy to try them but as I am out of things to try then I will probably leave AdminCentral undecorated for now. Thanks for your previous suggestions. Grégory Joseph wrote: > > Gavin, > > Something hit me: your decorator jsp itself might be going through the > Magnolia filters (by default, it's mapped to / and with dispatchers on > request, forward AND include) - maybe try adding a bypass for it in the > global bypasses at /server/filters/bypasses ? > > -g > > On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: > >> >> I had the SiteMesh filter after the Magnolia filter but if I move it in >> front I get some partial success. The decorator is applied but there is >> an error: >> >> java.lang.IllegalStateException: MgnlContext is not set for this thread >> >> and the login screen loads with parts of the decorator applied but most >> of it is missing. If I then login I get the following shown in Firefox: >> >> Content Encoding Error >> The page you are trying to view cannot be shown because it uses an >> invalid or unsupported form of compression. >> The page you are trying to view cannot be shown because it uses an >> invalid or unsupported form of compression. >> >> I have not been successful in turning off compression in Magnolia to see >> if that solves this second problem. I have tried to delete the gzip >> nodes from: >> >> Config => server => filters => gzip >> >> Config => server => filters => gzip => bypasses => contentAllowed => >> allowed >> >> Config => modules => cache =>config => compression => voters >> =>contentType => allowed >> >> But the content still came out with gzip compression. The server does >> not have compression enabled so I have no idea where it comes from. >> >> >> >> >> >> >> >> >> >> >> Grégory Joseph wrote: >>> >>> Is your sitemesh filter before or after Magnolia's? This might be due to >>> how requests that end up in the admincentral servlets treat the filter >>> chain - can you try to see if /.magnolia/trees/website.html gets >>> decorated, for example ? Or a simpler page such as >>> /.magnolia/pages/configuration.html ? >>> >>> The fact that the login form does not get decorated might be due to the >>> fact that sitemesh treats pages differently depending on the http >>> response code ? (i really don't know if it does, just wild guessing) >>> >>> -g >>> >>> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >>> >>>> >>>> Thanks for taking the time to reply. >>>> >>>> I am trying to get AdminCentral decorated with SiteMesh. Currently >>>> AdminCentral is not decorated at all. I took a look at the source and >>>> see that past the login screen a single iframe is used. However, the >>>> login screen does not seem to use frames and it still is not decorated. >>>> I added the following to my sitemesh.xml file: >>>> >>>> <mapper >>>> class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>>> >>>> <param name="decorator" value="prosoc-cms-admin" /> >>>> </mapper> >>>> >>>> Where 'prosoc-cms-admin' is the name of the decorator in the >>>> decorator.xml file. My web.xml uses: >>>> >>>> <filter> >>>> <filter-name>sitemesh</filter-name> >>>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> >>>> >>>> >>>> </filter> >>>> >>>> <filter-mapping> >>>> <filter-name>sitemesh</filter-name> >>>> <url-pattern>/*</url-pattern> >>>> <dispatcher>REQUEST</dispatcher> >>>> <dispatcher>FORWARD</dispatcher> >>>> </filter-mapping> >>>> >>>> I am not sure why AdminCentral does not get decorated. Any suggestions >>>> are certainly welcome. >>>> >>>> >>>> >>>> Grégory Joseph wrote: >>>>> >>>>> Hi Gavin, >>>>> >>>>> Any specifics on what the problem(s) is/are ? What are you trying to >>>>> achieve specifically ? I suppose you've noticed the admincentral is >>>>> built with frames.. and I seem to remember Sitemesh had frame-specific >>>>> features/configuration, did you check that ? >>>>> >>>>> -g >>>>> >>>>> >>>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>>> >>>>>> >>>>>> I have added magnolia onto an existing web app so that it can >>>>>> control a >>>>>> part of the site. The site contains other applications as well (blog, >>>>>> forum etc) and so Sitemesh is used for decoration. I have added >>>>>> SiteMesh >>>>>> to the Magnolia instances and it works perfectly for the 'create' >>>>>> pages >>>>>> in AdminCentral and also for the public instance. I have not been >>>>>> successful in getting SiteMesh to decorate the actual AdminCentral >>>>>> itself though (either public or author) and can't think of any reason >>>>>> why. The SiteMesh decorator is simply: >>>>>> >>>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>>> <pattern>/*</pattern> >>>>>> </decorator> >>>>>> >>>>>> Does anyone have any suggestions or has can say they have >>>>>> successfully >>>>>> managed to decorate AdminCentral? >>>>>> >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> For list details see >>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>> ---------------------------------------------------------------- >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>> ---------------------------------------------------------------- >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >>> >>> >>> >> >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemHi again, Haaa this is getting frustrating, because I've been willing to integrate Sitemesh and Magnolia ever since I started working with the latter (and had to abandon previous projects using the former) Hopefully helpful suggestions inline: On Jun 19, 2009, at 1:41 PM, Gavin Donald wrote: > > Thanks for the additional ideas. I have tried them as far as I could > and > could not get it to work. > > The use case is that the site has several web applications running > on it > (Apache Roller , MVNForum, Magnolia as well as a custom core that > provides site specific facilities). The public and admin sections of > each of those application is SiteMesh decorated and so it would keep > everything looking the same if the Magnolia AdminCentral was also > decorated. The decorators also contain the shared navigation sections > and so if a user enters AdminCentral they loose all the navigation > elements that let them easily move between the different applications. Makes a lot of sense. > > I added the following: > > Server/filters/bypasses > Content-node: sitemesh-decorator > data-node: class => info.magnploa.voting.voters.URIStartsWithVoter > data-node: pattern: => /prosoc-view/decorator Providing the typo was only in the email and not in your config, this looks correct. > I have looked at the source in the browser and then called each of the > JS files in turn. Non of them are decorated and all are present > including the: > > /.magnolia/pages/javascript.js > > I mention that file specifically because when SiteMesh is active and I > call /magnolia/trees/website.html I get an error in the JavaScript > console saying that 'MgnlTextField' could not be found. This > JavaScript > call is called from near the bottom of website.html and the function > is > defined in javascript.js. That could indicate what I was suspecting about Sitemesh rearranging the script tags in the <head> - see below. > I have added: > > <excludes> > <pattern>*.js</pattern> > </excludes> > > to the decorators.xml file. > > You mentioned: > > "Depending on your decorator/configuration, it might also be that > Sitemesh tries to reorganize the script tags, for instance. If I > remember correctly from when I used it before, it's sort of its > default > behaviour, because you'll usually want to insert stuff in the <head> > tags. Can you disable that? Or bypass it altogether for the whole > /.magnolia and /.resources, for instance ?" > > but I didn't really understand how to do that. Well - I don't really know either, been quite a while since I used Sitemesh. What I seem to remember is that you could feed it with a page that has, for instance, <script> and <style> tags lying around in the <body> tag, and Sitemesh would nicely rearrange them inside the <head> tag of the page. If that happens, there might be a few bits and pieces that don't work anymore (typically, inline javascript within the page that would expect to have some methods or object available - if the order of the scripts is modified, things might start to get hairy) Could you compare the results of an undecorated and decorated /.magnolia/trees/website.html with that in mind ? > When I put the SiteMesh filter before the magnolia filter I > frequently get: > > MgnlContext is not set for this thread <...> To understand what goes wrong there, we'd need a few more lines of the exception - could you attach a sample to your email, or paste it on nopaste.org ? If your Magnolia instance runs fine on its own (without SM), I can't really see why this would happen with SM --- at least not without more details or trying out myself ... > If you have any other ideas then I would be happy to try them but as I > am out of things to try then I will probably leave AdminCentral > undecorated for now. Thanks for your previous suggestions. Is there a chance we could see your decorator.jsp; maybe it'd remind me a few other things I forgot about SM... Cheers, -g Grégory Joseph wrote: >> >> Gavin, >> >> Something hit me: your decorator jsp itself might be going through >> the >> Magnolia filters (by default, it's mapped to / and with dispatchers >> on >> request, forward AND include) - maybe try adding a bypass for it in >> the >> global bypasses at /server/filters/bypasses ? >> >> -g >> >> On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: >> >>> >>> I had the SiteMesh filter after the Magnolia filter but if I move >>> it in >>> front I get some partial success. The decorator is applied but >>> there is >>> an error: >>> >>> java.lang.IllegalStateException: MgnlContext is not set for this >>> thread >>> >>> and the login screen loads with parts of the decorator applied but >>> most >>> of it is missing. If I then login I get the following shown in >>> Firefox: >>> >>> Content Encoding Error >>> The page you are trying to view cannot be shown because it uses an >>> invalid or unsupported form of compression. >>> The page you are trying to view cannot be shown because it uses an >>> invalid or unsupported form of compression. >>> >>> I have not been successful in turning off compression in Magnolia >>> to see >>> if that solves this second problem. I have tried to delete the gzip >>> nodes from: >>> >>> Config => server => filters => gzip >>> >>> Config => server => filters => gzip => bypasses => contentAllowed => >>> allowed >>> >>> Config => modules => cache =>config => compression => voters >>> =>contentType => allowed >>> >>> But the content still came out with gzip compression. The server >>> does >>> not have compression enabled so I have no idea where it comes from. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Grégory Joseph wrote: >>>> >>>> Is your sitemesh filter before or after Magnolia's? This might be >>>> due to >>>> how requests that end up in the admincentral servlets treat the >>>> filter >>>> chain - can you try to see if /.magnolia/trees/website.html gets >>>> decorated, for example ? Or a simpler page such as >>>> /.magnolia/pages/configuration.html ? >>>> >>>> The fact that the login form does not get decorated might be due >>>> to the >>>> fact that sitemesh treats pages differently depending on the http >>>> response code ? (i really don't know if it does, just wild >>>> guessing) >>>> >>>> -g >>>> >>>> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >>>> >>>>> >>>>> Thanks for taking the time to reply. >>>>> >>>>> I am trying to get AdminCentral decorated with SiteMesh. Currently >>>>> AdminCentral is not decorated at all. I took a look at the >>>>> source and >>>>> see that past the login screen a single iframe is used. However, >>>>> the >>>>> login screen does not seem to use frames and it still is not >>>>> decorated. >>>>> I added the following to my sitemesh.xml file: >>>>> >>>>> <mapper >>>>> class >>>>> = >>>>> "com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>>>> >>>>> <param name="decorator" value="prosoc-cms-admin" /> >>>>> </mapper> >>>>> >>>>> Where 'prosoc-cms-admin' is the name of the decorator in the >>>>> decorator.xml file. My web.xml uses: >>>>> >>>>> <filter> >>>>> <filter-name>sitemesh</filter-name> >>>>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</ >>>>> filter-class> >>>>> >>>>> >>>>> </filter> >>>>> >>>>> <filter-mapping> >>>>> <filter-name>sitemesh</filter-name> >>>>> <url-pattern>/*</url-pattern> >>>>> <dispatcher>REQUEST</dispatcher> >>>>> <dispatcher>FORWARD</dispatcher> >>>>> </filter-mapping> >>>>> >>>>> I am not sure why AdminCentral does not get decorated. Any >>>>> suggestions >>>>> are certainly welcome. >>>>> >>>>> >>>>> >>>>> Grégory Joseph wrote: >>>>>> >>>>>> Hi Gavin, >>>>>> >>>>>> Any specifics on what the problem(s) is/are ? What are you >>>>>> trying to >>>>>> achieve specifically ? I suppose you've noticed the >>>>>> admincentral is >>>>>> built with frames.. and I seem to remember Sitemesh had frame- >>>>>> specific >>>>>> features/configuration, did you check that ? >>>>>> >>>>>> -g >>>>>> >>>>>> >>>>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>>>> >>>>>>> >>>>>>> I have added magnolia onto an existing web app so that it can >>>>>>> control a >>>>>>> part of the site. The site contains other applications as well >>>>>>> (blog, >>>>>>> forum etc) and so Sitemesh is used for decoration. I have added >>>>>>> SiteMesh >>>>>>> to the Magnolia instances and it works perfectly for the >>>>>>> 'create' >>>>>>> pages >>>>>>> in AdminCentral and also for the public instance. I have not >>>>>>> been >>>>>>> successful in getting SiteMesh to decorate the actual >>>>>>> AdminCentral >>>>>>> itself though (either public or author) and can't think of any >>>>>>> reason >>>>>>> why. The SiteMesh decorator is simply: >>>>>>> >>>>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>>>> <pattern>/*</pattern> >>>>>>> </decorator> >>>>>>> >>>>>>> Does anyone have any suggestions or has can say they have >>>>>>> successfully >>>>>>> managed to decorate AdminCentral? >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> For list details see >>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>>> > >>>>>>> ---------------------------------------------------------------- >>>>>> >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> For list details see >>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>> > >>>>>> ---------------------------------------------------------------- >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@magnolia- >>>>> cms.com> >>>>> ---------------------------------------------------------------- >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>>> >>>> >>>> >>> >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- >> >> >> > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemWell, I am not sure what has changed but I now have a different problem. The problem I am now seeing was intermittent before but is now continual (I did a clean redeploy). The error (below) happens whenever the SiteMesh filter is placed before the Magnolis filter. If the SiteMesh filter is put after Magnolia filter then AdminCentral functions perfectly but is undecorated. The error occurs in the method of info.magnolia.context.MgnlContext.AggregationState() which is: public static AggregationState getAggregationState() { final WebContext ctx = getWebContextOrNull(); if (ctx != null) { return ctx.getAggregationState(); } else { throw new IllegalStateException("Can only get the aggregation state within a WebContext."); } } where ctx is null which is because ThreadLocal.get() is returning null but to be honest I don't really understand what ThreadLocal.get() actually does. ----- START ERROR ----- 21-Jun-2009 12:48:32 org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: Can only get the aggregation state within a WebContext. at info.magnolia.context.MgnlContext.getAggregationState(MgnlContext.java:221) at info.magnolia.cms.taglibs.Resource.getCurrentActivePage(Resource.java:89) at info.magnolia.cms.taglibs.util.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java:350) at org.apache.jsp.prosoc_002dview.decorator.decorator_002dprosoc_002dcms_002dpublic_jsp._jspx_meth_cmsu_005fsimpleNavigation_005f0(decorator_002dprosoc_002dcms_002dpublic_jsp.java:893) at org.apache.jsp.prosoc_002dview.decorator.decorator_002dprosoc_002dcms_002dpublic_jsp._jspService(decorator_002dprosoc_002dcms_002dpublic_jsp.java:312) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) at com.opensymphony.module.sitemesh.filter.PageFilter.writeDecorator(PageFilter.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:158) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) 21-Jun-2009 12:48:32 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet default threw exception java.lang.IllegalStateException: Can only get the aggregation state within a WebContext. at info.magnolia.context.MgnlContext.getAggregationState(MgnlContext.java:221) at info.magnolia.cms.taglibs.Resource.getCurrentActivePage(Resource.java:89) at info.magnolia.cms.taglibs.util.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java:350) at org.apache.jsp.prosoc_002dview.decorator.decorator_002dprosoc_002dcms_002dpublic_jsp._jspx_meth_cmsu_005fsimpleNavigation_005f0(decorator_002dprosoc_002dcms_002dpublic_jsp.java:893) at org.apache.jsp.prosoc_002dview.decorator.decorator_002dprosoc_002dcms_002dpublic_jsp._jspService(decorator_002dprosoc_002dcms_002dpublic_jsp.java:312) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) at com.opensymphony.module.sitemesh.filter.PageFilter.writeDecorator(PageFilter.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:158) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) ----- END ERROR ----- Grégory Joseph wrote: > > Hi again, > > Haaa this is getting frustrating, because I've been willing to integrate > Sitemesh and Magnolia ever since I started working with the latter (and > had to abandon previous projects using the former) > > Hopefully helpful suggestions inline: > > On Jun 19, 2009, at 1:41 PM, Gavin Donald wrote: > >> >> Thanks for the additional ideas. I have tried them as far as I could and >> could not get it to work. >> >> The use case is that the site has several web applications running on it >> (Apache Roller , MVNForum, Magnolia as well as a custom core that >> provides site specific facilities). The public and admin sections of >> each of those application is SiteMesh decorated and so it would keep >> everything looking the same if the Magnolia AdminCentral was also >> decorated. The decorators also contain the shared navigation sections >> and so if a user enters AdminCentral they loose all the navigation >> elements that let them easily move between the different applications. > > Makes a lot of sense. > >> >> I added the following: >> >> Server/filters/bypasses >> Content-node: sitemesh-decorator >> data-node: class => info.magnploa.voting.voters.URIStartsWithVoter >> data-node: pattern: => /prosoc-view/decorator > > Providing the typo was only in the email and not in your config, this > looks correct. > >> I have looked at the source in the browser and then called each of the >> JS files in turn. Non of them are decorated and all are present >> including the: >> >> /.magnolia/pages/javascript.js >> >> I mention that file specifically because when SiteMesh is active and I >> call /magnolia/trees/website.html I get an error in the JavaScript >> console saying that 'MgnlTextField' could not be found. This JavaScript >> call is called from near the bottom of website.html and the function is >> defined in javascript.js. > > That could indicate what I was suspecting about Sitemesh rearranging the > script tags in the <head> - see below. > > >> I have added: >> >> <excludes> >> <pattern>*.js</pattern> >> </excludes> >> >> to the decorators.xml file. >> >> You mentioned: >> >> "Depending on your decorator/configuration, it might also be that >> Sitemesh tries to reorganize the script tags, for instance. If I >> remember correctly from when I used it before, it's sort of its default >> behaviour, because you'll usually want to insert stuff in the <head> >> tags. Can you disable that? Or bypass it altogether for the whole >> /.magnolia and /.resources, for instance ?" >> >> but I didn't really understand how to do that. > > Well - I don't really know either, been quite a while since I used > Sitemesh. > What I seem to remember is that you could feed it with a page that has, > for instance, <script> and <style> tags lying around in the <body> tag, > and Sitemesh would nicely rearrange them inside the <head> tag of the page. > If that happens, there might be a few bits and pieces that don't work > anymore (typically, inline javascript within the page that would expect > to have some methods or object available - if the order of the scripts > is modified, things might start to get hairy) > > Could you compare the results of an undecorated and decorated > /.magnolia/trees/website.html with that in mind ? > >> When I put the SiteMesh filter before the magnolia filter I frequently >> get: >> >> MgnlContext is not set for this thread > <...> > To understand what goes wrong there, we'd need a few more lines of the > exception - could you attach a sample to your email, or paste it on > nopaste.org ? If your Magnolia instance runs fine on its own (without > SM), I can't really see why this would happen with SM --- at least not > without more details or trying out myself ... > >> If you have any other ideas then I would be happy to try them but as I >> am out of things to try then I will probably leave AdminCentral >> undecorated for now. Thanks for your previous suggestions. > > Is there a chance we could see your decorator.jsp; maybe it'd remind me > a few other things I forgot about SM... > > Cheers, > > -g > > Grégory Joseph wrote: >>> >>> Gavin, >>> >>> Something hit me: your decorator jsp itself might be going through the >>> Magnolia filters (by default, it's mapped to / and with dispatchers on >>> request, forward AND include) - maybe try adding a bypass for it in the >>> global bypasses at /server/filters/bypasses ? >>> >>> -g >>> >>> On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: >>> >>>> >>>> I had the SiteMesh filter after the Magnolia filter but if I move it in >>>> front I get some partial success. The decorator is applied but there is >>>> an error: >>>> >>>> java.lang.IllegalStateException: MgnlContext is not set for this thread >>>> >>>> and the login screen loads with parts of the decorator applied but most >>>> of it is missing. If I then login I get the following shown in Firefox: >>>> >>>> Content Encoding Error >>>> The page you are trying to view cannot be shown because it uses an >>>> invalid or unsupported form of compression. >>>> The page you are trying to view cannot be shown because it uses an >>>> invalid or unsupported form of compression. >>>> >>>> I have not been successful in turning off compression in Magnolia to >>>> see >>>> if that solves this second problem. I have tried to delete the gzip >>>> nodes from: >>>> >>>> Config => server => filters => gzip >>>> >>>> Config => server => filters => gzip => bypasses => contentAllowed => >>>> allowed >>>> >>>> Config => modules => cache =>config => compression => voters >>>> =>contentType => allowed >>>> >>>> But the content still came out with gzip compression. The server does >>>> not have compression enabled so I have no idea where it comes from. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Grégory Joseph wrote: >>>>> >>>>> Is your sitemesh filter before or after Magnolia's? This might be >>>>> due to >>>>> how requests that end up in the admincentral servlets treat the filter >>>>> chain - can you try to see if /.magnolia/trees/website.html gets >>>>> decorated, for example ? Or a simpler page such as >>>>> /.magnolia/pages/configuration.html ? >>>>> >>>>> The fact that the login form does not get decorated might be due to >>>>> the >>>>> fact that sitemesh treats pages differently depending on the http >>>>> response code ? (i really don't know if it does, just wild guessing) >>>>> >>>>> -g >>>>> >>>>> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >>>>> >>>>>> >>>>>> Thanks for taking the time to reply. >>>>>> >>>>>> I am trying to get AdminCentral decorated with SiteMesh. Currently >>>>>> AdminCentral is not decorated at all. I took a look at the source and >>>>>> see that past the login screen a single iframe is used. However, the >>>>>> login screen does not seem to use frames and it still is not >>>>>> decorated. >>>>>> I added the following to my sitemesh.xml file: >>>>>> >>>>>> <mapper >>>>>> class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>>>>> >>>>>> >>>>>> <param name="decorator" value="prosoc-cms-admin" /> >>>>>> </mapper> >>>>>> >>>>>> Where 'prosoc-cms-admin' is the name of the decorator in the >>>>>> decorator.xml file. My web.xml uses: >>>>>> >>>>>> <filter> >>>>>> <filter-name>sitemesh</filter-name> >>>>>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> >>>>>> >>>>>> >>>>>> >>>>>> </filter> >>>>>> >>>>>> <filter-mapping> >>>>>> <filter-name>sitemesh</filter-name> >>>>>> <url-pattern>/*</url-pattern> >>>>>> <dispatcher>REQUEST</dispatcher> >>>>>> <dispatcher>FORWARD</dispatcher> >>>>>> </filter-mapping> >>>>>> >>>>>> I am not sure why AdminCentral does not get decorated. Any >>>>>> suggestions >>>>>> are certainly welcome. >>>>>> >>>>>> >>>>>> >>>>>> Grégory Joseph wrote: >>>>>>> >>>>>>> Hi Gavin, >>>>>>> >>>>>>> Any specifics on what the problem(s) is/are ? What are you trying to >>>>>>> achieve specifically ? I suppose you've noticed the admincentral is >>>>>>> built with frames.. and I seem to remember Sitemesh had >>>>>>> frame-specific >>>>>>> features/configuration, did you check that ? >>>>>>> >>>>>>> -g >>>>>>> >>>>>>> >>>>>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>>>>> >>>>>>>> >>>>>>>> I have added magnolia onto an existing web app so that it can >>>>>>>> control a >>>>>>>> part of the site. The site contains other applications as well >>>>>>>> (blog, >>>>>>>> forum etc) and so Sitemesh is used for decoration. I have added >>>>>>>> SiteMesh >>>>>>>> to the Magnolia instances and it works perfectly for the 'create' >>>>>>>> pages >>>>>>>> in AdminCentral and also for the public instance. I have not been >>>>>>>> successful in getting SiteMesh to decorate the actual AdminCentral >>>>>>>> itself though (either public or author) and can't think of any >>>>>>>> reason >>>>>>>> why. The SiteMesh decorator is simply: >>>>>>>> >>>>>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>>>>> <pattern>/*</pattern> >>>>>>>> </decorator> >>>>>>>> >>>>>>>> Does anyone have any suggestions or has can say they have >>>>>>>> successfully >>>>>>>> managed to decorate AdminCentral? >>>>>>>> >>>>>>>> >>>>>>>> ---------------------------------------------------------------- >>>>>>>> For list details see >>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>>>> ---------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> For list details see >>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>>> ---------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> For list details see >>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>> ---------------------------------------------------------------- >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>> ---------------------------------------------------------------- >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >>> >>> >>> >> >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemMy apologies for the second email but something has just occurred to me. As, when the SM filter is after the Magnolia filter the content managed pages get decorated correctly and it is only AdminCentral that does not get decorated then does it make sense to say that the SM filter should be left after the Magnolia filter? If that is the case then the question is why AdminCentral does not get decorated. Unfortunately there are no errors as SM does not even appear to get called. I have no idea why it is not called as I have a /WEB-INF/sitemesh.xml file that only has: <sitemesh> <property name="decorators-file" value="/WEB-INF/decorators.xml" /> <excludes file="${decorators-file}" /> <page-parsers> <parser content-type="text/html" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" /> <parser content-type="text/html;charset=ISO-8859-1" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" /> </page-parsers> <decorator-mappers> <!--<mapper class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> </mapper>--> <mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper"> <param name="config" value="${decorators-file}" /> </mapper> </decorator-mappers> </sitemesh> so even if AdminCentral uses frames (which I have not seen in the browser source except for a single iframe) then, as the FrameSetDecoratorMapper is commented out, it would still be being decorated. I am perplexed. I realise I have not sent you the files you mentioned in your last email but that is because the problem seems, for some reason to have changed and I did not want to confuse things too much. Let me know if you think seeing any files is useful, I am happy to supply them. Many thanks for your suggestions so far. Grégory Joseph wrote: > > Hi again, > > Haaa this is getting frustrating, because I've been willing to integrate > Sitemesh and Magnolia ever since I started working with the latter (and > had to abandon previous projects using the former) > > Hopefully helpful suggestions inline: > > On Jun 19, 2009, at 1:41 PM, Gavin Donald wrote: > >> >> Thanks for the additional ideas. I have tried them as far as I could and >> could not get it to work. >> >> The use case is that the site has several web applications running on it >> (Apache Roller , MVNForum, Magnolia as well as a custom core that >> provides site specific facilities). The public and admin sections of >> each of those application is SiteMesh decorated and so it would keep >> everything looking the same if the Magnolia AdminCentral was also >> decorated. The decorators also contain the shared navigation sections >> and so if a user enters AdminCentral they loose all the navigation >> elements that let them easily move between the different applications. > > Makes a lot of sense. > >> >> I added the following: >> >> Server/filters/bypasses >> Content-node: sitemesh-decorator >> data-node: class => info.magnploa.voting.voters.URIStartsWithVoter >> data-node: pattern: => /prosoc-view/decorator > > Providing the typo was only in the email and not in your config, this > looks correct. > >> I have looked at the source in the browser and then called each of the >> JS files in turn. Non of them are decorated and all are present >> including the: >> >> /.magnolia/pages/javascript.js >> >> I mention that file specifically because when SiteMesh is active and I >> call /magnolia/trees/website.html I get an error in the JavaScript >> console saying that 'MgnlTextField' could not be found. This JavaScript >> call is called from near the bottom of website.html and the function is >> defined in javascript.js. > > That could indicate what I was suspecting about Sitemesh rearranging the > script tags in the <head> - see below. > > >> I have added: >> >> <excludes> >> <pattern>*.js</pattern> >> </excludes> >> >> to the decorators.xml file. >> >> You mentioned: >> >> "Depending on your decorator/configuration, it might also be that >> Sitemesh tries to reorganize the script tags, for instance. If I >> remember correctly from when I used it before, it's sort of its default >> behaviour, because you'll usually want to insert stuff in the <head> >> tags. Can you disable that? Or bypass it altogether for the whole >> /.magnolia and /.resources, for instance ?" >> >> but I didn't really understand how to do that. > > Well - I don't really know either, been quite a while since I used > Sitemesh. > What I seem to remember is that you could feed it with a page that has, > for instance, <script> and <style> tags lying around in the <body> tag, > and Sitemesh would nicely rearrange them inside the <head> tag of the page. > If that happens, there might be a few bits and pieces that don't work > anymore (typically, inline javascript within the page that would expect > to have some methods or object available - if the order of the scripts > is modified, things might start to get hairy) > > Could you compare the results of an undecorated and decorated > /.magnolia/trees/website.html with that in mind ? > >> When I put the SiteMesh filter before the magnolia filter I frequently >> get: >> >> MgnlContext is not set for this thread > <...> > To understand what goes wrong there, we'd need a few more lines of the > exception - could you attach a sample to your email, or paste it on > nopaste.org ? If your Magnolia instance runs fine on its own (without > SM), I can't really see why this would happen with SM --- at least not > without more details or trying out myself ... > >> If you have any other ideas then I would be happy to try them but as I >> am out of things to try then I will probably leave AdminCentral >> undecorated for now. Thanks for your previous suggestions. > > Is there a chance we could see your decorator.jsp; maybe it'd remind me > a few other things I forgot about SM... > > Cheers, > > -g > > Grégory Joseph wrote: >>> >>> Gavin, >>> >>> Something hit me: your decorator jsp itself might be going through the >>> Magnolia filters (by default, it's mapped to / and with dispatchers on >>> request, forward AND include) - maybe try adding a bypass for it in the >>> global bypasses at /server/filters/bypasses ? >>> >>> -g >>> >>> On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: >>> >>>> >>>> I had the SiteMesh filter after the Magnolia filter but if I move it in >>>> front I get some partial success. The decorator is applied but there is >>>> an error: >>>> >>>> java.lang.IllegalStateException: MgnlContext is not set for this thread >>>> >>>> and the login screen loads with parts of the decorator applied but most >>>> of it is missing. If I then login I get the following shown in Firefox: >>>> >>>> Content Encoding Error >>>> The page you are trying to view cannot be shown because it uses an >>>> invalid or unsupported form of compression. >>>> The page you are trying to view cannot be shown because it uses an >>>> invalid or unsupported form of compression. >>>> >>>> I have not been successful in turning off compression in Magnolia to >>>> see >>>> if that solves this second problem. I have tried to delete the gzip >>>> nodes from: >>>> >>>> Config => server => filters => gzip >>>> >>>> Config => server => filters => gzip => bypasses => contentAllowed => >>>> allowed >>>> >>>> Config => modules => cache =>config => compression => voters >>>> =>contentType => allowed >>>> >>>> But the content still came out with gzip compression. The server does >>>> not have compression enabled so I have no idea where it comes from. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Grégory Joseph wrote: >>>>> >>>>> Is your sitemesh filter before or after Magnolia's? This might be >>>>> due to >>>>> how requests that end up in the admincentral servlets treat the filter >>>>> chain - can you try to see if /.magnolia/trees/website.html gets >>>>> decorated, for example ? Or a simpler page such as >>>>> /.magnolia/pages/configuration.html ? >>>>> >>>>> The fact that the login form does not get decorated might be due to >>>>> the >>>>> fact that sitemesh treats pages differently depending on the http >>>>> response code ? (i really don't know if it does, just wild guessing) >>>>> >>>>> -g >>>>> >>>>> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >>>>> >>>>>> >>>>>> Thanks for taking the time to reply. >>>>>> >>>>>> I am trying to get AdminCentral decorated with SiteMesh. Currently >>>>>> AdminCentral is not decorated at all. I took a look at the source and >>>>>> see that past the login screen a single iframe is used. However, the >>>>>> login screen does not seem to use frames and it still is not >>>>>> decorated. >>>>>> I added the following to my sitemesh.xml file: >>>>>> >>>>>> <mapper >>>>>> class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>>>>> >>>>>> >>>>>> <param name="decorator" value="prosoc-cms-admin" /> >>>>>> </mapper> >>>>>> >>>>>> Where 'prosoc-cms-admin' is the name of the decorator in the >>>>>> decorator.xml file. My web.xml uses: >>>>>> >>>>>> <filter> >>>>>> <filter-name>sitemesh</filter-name> >>>>>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> >>>>>> >>>>>> >>>>>> >>>>>> </filter> >>>>>> >>>>>> <filter-mapping> >>>>>> <filter-name>sitemesh</filter-name> >>>>>> <url-pattern>/*</url-pattern> >>>>>> <dispatcher>REQUEST</dispatcher> >>>>>> <dispatcher>FORWARD</dispatcher> >>>>>> </filter-mapping> >>>>>> >>>>>> I am not sure why AdminCentral does not get decorated. Any >>>>>> suggestions >>>>>> are certainly welcome. >>>>>> >>>>>> >>>>>> >>>>>> Grégory Joseph wrote: >>>>>>> >>>>>>> Hi Gavin, >>>>>>> >>>>>>> Any specifics on what the problem(s) is/are ? What are you trying to >>>>>>> achieve specifically ? I suppose you've noticed the admincentral is >>>>>>> built with frames.. and I seem to remember Sitemesh had >>>>>>> frame-specific >>>>>>> features/configuration, did you check that ? >>>>>>> >>>>>>> -g >>>>>>> >>>>>>> >>>>>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>>>>> >>>>>>>> >>>>>>>> I have added magnolia onto an existing web app so that it can >>>>>>>> control a >>>>>>>> part of the site. The site contains other applications as well >>>>>>>> (blog, >>>>>>>> forum etc) and so Sitemesh is used for decoration. I have added >>>>>>>> SiteMesh >>>>>>>> to the Magnolia instances and it works perfectly for the 'create' >>>>>>>> pages >>>>>>>> in AdminCentral and also for the public instance. I have not been >>>>>>>> successful in getting SiteMesh to decorate the actual AdminCentral >>>>>>>> itself though (either public or author) and can't think of any >>>>>>>> reason >>>>>>>> why. The SiteMesh decorator is simply: >>>>>>>> >>>>>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>>>>> <pattern>/*</pattern> >>>>>>>> </decorator> >>>>>>>> >>>>>>>> Does anyone have any suggestions or has can say they have >>>>>>>> successfully >>>>>>>> managed to decorate AdminCentral? >>>>>>>> >>>>>>>> >>>>>>>> ---------------------------------------------------------------- >>>>>>>> For list details see >>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>>>> ---------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> For list details see >>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>>> ---------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> For list details see >>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>> ---------------------------------------------------------------- >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>> ---------------------------------------------------------------- >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >>> >>> >>> >> >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemHi, On Jun 21, 2009, at 2:23 PM, Gavin Donald wrote: > My apologies for the second email but something has just occurred to > me. > As, when the SM filter is after the Magnolia filter the content > managed > pages get decorated correctly and it is only AdminCentral that does > not > get decorated then does it make sense to say that the SM filter should > be left after the Magnolia filter? If that is the case then the > question > is why AdminCentral does not get decorated. Unfortunately there are no > errors as SM does not even appear to get called. What surprises me in this scenario is that regular Magnolia pages would be decorated too. Re: your previous email: What the error message below says, and the stacktrace demonstrates, is that your decorator jsp file is trying to use Magnolia code, while the context is not set. This happens because the decoration happens outside the Magnolia filter chain. Remove the cmsu:simpleNavigation usage from your decorator, and this should work. If you need to use Magnolia content in your decorator itself, you probably have no other choice than to setup the SM filter inside the Magnolia filter chain (config:/server/filters); which will in turn mean you'll probably have to setup bypasses for your other applications in there too. Cheers, -g On Jun 21, 2009, at 2:07 PM, Gavin Donald wrote: > > Well, I am not sure what has changed but I now have a different > problem. > The problem I am now seeing was intermittent before but is now > continual > (I did a clean redeploy). The error (below) happens whenever the > SiteMesh filter is placed before the Magnolis filter. If the SiteMesh > filter is put after Magnolia filter then AdminCentral functions > perfectly but is undecorated. The error occurs in the method of > info.magnolia.context.MgnlContext.AggregationState() which is: > > public static AggregationState getAggregationState() { > final WebContext ctx = getWebContextOrNull(); > if (ctx != null) { > return ctx.getAggregationState(); > } else { > throw new IllegalStateException("Can only get the > aggregation state within a WebContext."); > } > } > > where ctx is null which is because ThreadLocal.get() is returning null > but to be honest I don't really understand what ThreadLocal.get() > actually does. > > > ----- START ERROR ----- > 21-Jun-2009 12:48:32 org.apache.catalina.core.ApplicationDispatcher > invoke > SEVERE: Servlet.service() for servlet jsp threw exception > java.lang.IllegalStateException: Can only get the aggregation state > within a WebContext. > at > info > .magnolia.context.MgnlContext.getAggregationState(MgnlContext.java: > 221) > at > info > .magnolia.cms.taglibs.Resource.getCurrentActivePage(Resource.java:89) > at > info > .magnolia > .cms > .taglibs.util.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java: > 350) > at > org > .apache > .jsp > .prosoc_002dview > .decorator > .decorator_002dprosoc_002dcms_002dpublic_jsp > ._jspx_meth_cmsu_005fsimpleNavigation_005f0 > (decorator_002dprosoc_002dcms_002dpublic_jsp.java:893) > at > org > .apache > .jsp > .prosoc_002dview > .decorator > .decorator_002dprosoc_002dcms_002dpublic_jsp > ._jspService(decorator_002dprosoc_002dcms_002dpublic_jsp.java:312) > at > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at > org > .apache > .jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: > 342) > at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at > org > .apache > .catalina > .core > .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: > 290) > at > org > .apache > .catalina > .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org > .apache > .catalina > .core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) > at > org > .apache > .catalina > .core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535) > at > org > .apache > .catalina > .core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) > at > com > .opensymphony > .module.sitemesh.filter.PageFilter.writeDecorator(PageFilter.java:173) > at > com > .opensymphony > .module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:158) > at > com > .opensymphony > .module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) > at > org > .apache > .catalina > .core > .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: > 235) > at > org > .apache > .catalina > .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org > .apache > .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: > 233) > at > org > .apache > .catalina.core.StandardContextValve.invoke(StandardContextValve.java: > 191) > at > org > .apache > .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) > at > org > .apache > .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: > 568) > at > org > .apache > .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: > 109) > at > org > .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: > 286) > at > org > .apache.coyote.http11.Http11Processor.process(Http11Processor.java: > 845) > at > org.apache.coyote.http11.Http11Protocol > $Http11ConnectionHandler.process(Http11Protocol.java:583) > at > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: > 447) > at java.lang.Thread.run(Thread.java:619) > 21-Jun-2009 12:48:32 org.apache.catalina.core.StandardWrapperValve > invoke > SEVERE: Servlet.service() for servlet default threw exception > java.lang.IllegalStateException: Can only get the aggregation state > within a WebContext. > at > info > .magnolia.context.MgnlContext.getAggregationState(MgnlContext.java: > 221) > at > info > .magnolia.cms.taglibs.Resource.getCurrentActivePage(Resource.java:89) > at > info > .magnolia > .cms > .taglibs.util.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java: > 350) > at > org > .apache > .jsp > .prosoc_002dview > .decorator > .decorator_002dprosoc_002dcms_002dpublic_jsp > ._jspx_meth_cmsu_005fsimpleNavigation_005f0 > (decorator_002dprosoc_002dcms_002dpublic_jsp.java:893) > at > org > .apache > .jsp > .prosoc_002dview > .decorator > .decorator_002dprosoc_002dcms_002dpublic_jsp > ._jspService(decorator_002dprosoc_002dcms_002dpublic_jsp.java:312) > at > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at > org > .apache > .jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: > 342) > at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at > org > .apache > .catalina > .core > .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: > 290) > at > org > .apache > .catalina > .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org > .apache > .catalina > .core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) > at > org > .apache > .catalina > .core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535) > at > org > .apache > .catalina > .core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) > at > com > .opensymphony > .module.sitemesh.filter.PageFilter.writeDecorator(PageFilter.java:173) > at > com > .opensymphony > .module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:158) > at > com > .opensymphony > .module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) > at > org > .apache > .catalina > .core > .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: > 235) > at > org > .apache > .catalina > .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org > .apache > .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: > 233) > at > org > .apache > .catalina.core.StandardContextValve.invoke(StandardContextValve.java: > 191) > at > org > .apache > .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) > at > org > .apache > .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: > 568) > at > org > .apache > .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: > 109) > at > org > .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: > 286) > at > org > .apache.coyote.http11.Http11Processor.process(Http11Processor.java: > 845) > at > org.apache.coyote.http11.Http11Protocol > $Http11ConnectionHandler.process(Http11Protocol.java:583) > at > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: > 447) > at java.lang.Thread.run(Thread.java:619) > ----- END ERROR ----- > > > > > > > > Grégory Joseph wrote: >> >> Hi again, >> >> Haaa this is getting frustrating, because I've been willing to >> integrate >> Sitemesh and Magnolia ever since I started working with the latter >> (and >> had to abandon previous projects using the former) >> >> Hopefully helpful suggestions inline: >> >> On Jun 19, 2009, at 1:41 PM, Gavin Donald wrote: >> >>> >>> Thanks for the additional ideas. I have tried them as far as I >>> could and >>> could not get it to work. >>> >>> The use case is that the site has several web applications running >>> on it >>> (Apache Roller , MVNForum, Magnolia as well as a custom core that >>> provides site specific facilities). The public and admin sections of >>> each of those application is SiteMesh decorated and so it would keep >>> everything looking the same if the Magnolia AdminCentral was also >>> decorated. The decorators also contain the shared navigation >>> sections >>> and so if a user enters AdminCentral they loose all the navigation >>> elements that let them easily move between the different >>> applications. >> >> Makes a lot of sense. >> >>> >>> I added the following: >>> >>> Server/filters/bypasses >>> Content-node: sitemesh-decorator >>> data-node: class => info.magnploa.voting.voters.URIStartsWithVoter >>> data-node: pattern: => /prosoc-view/decorator >> >> Providing the typo was only in the email and not in your config, this >> looks correct. >> >>> I have looked at the source in the browser and then called each of >>> the >>> JS files in turn. Non of them are decorated and all are present >>> including the: >>> >>> /.magnolia/pages/javascript.js >>> >>> I mention that file specifically because when SiteMesh is active >>> and I >>> call /magnolia/trees/website.html I get an error in the JavaScript >>> console saying that 'MgnlTextField' could not be found. This >>> JavaScript >>> call is called from near the bottom of website.html and the >>> function is >>> defined in javascript.js. >> >> That could indicate what I was suspecting about Sitemesh >> rearranging the >> script tags in the <head> - see below. >> >> >>> I have added: >>> >>> <excludes> >>> <pattern>*.js</pattern> >>> </excludes> >>> >>> to the decorators.xml file. >>> >>> You mentioned: >>> >>> "Depending on your decorator/configuration, it might also be that >>> Sitemesh tries to reorganize the script tags, for instance. If I >>> remember correctly from when I used it before, it's sort of its >>> default >>> behaviour, because you'll usually want to insert stuff in the <head> >>> tags. Can you disable that? Or bypass it altogether for the whole >>> /.magnolia and /.resources, for instance ?" >>> >>> but I didn't really understand how to do that. >> >> Well - I don't really know either, been quite a while since I used >> Sitemesh. >> What I seem to remember is that you could feed it with a page that >> has, >> for instance, <script> and <style> tags lying around in the <body> >> tag, >> and Sitemesh would nicely rearrange them inside the <head> tag of >> the page. >> If that happens, there might be a few bits and pieces that don't work >> anymore (typically, inline javascript within the page that would >> expect >> to have some methods or object available - if the order of the >> scripts >> is modified, things might start to get hairy) >> >> Could you compare the results of an undecorated and decorated >> /.magnolia/trees/website.html with that in mind ? >> >>> When I put the SiteMesh filter before the magnolia filter I >>> frequently >>> get: >>> >>> MgnlContext is not set for this thread >> <...> >> To understand what goes wrong there, we'd need a few more lines of >> the >> exception - could you attach a sample to your email, or paste it on >> nopaste.org ? If your Magnolia instance runs fine on its own (without >> SM), I can't really see why this would happen with SM --- at least >> not >> without more details or trying out myself ... >> >>> If you have any other ideas then I would be happy to try them but >>> as I >>> am out of things to try then I will probably leave AdminCentral >>> undecorated for now. Thanks for your previous suggestions. >> >> Is there a chance we could see your decorator.jsp; maybe it'd >> remind me >> a few other things I forgot about SM... >> >> Cheers, >> >> -g >> >> Grégory Joseph wrote: >>>> >>>> Gavin, >>>> >>>> Something hit me: your decorator jsp itself might be going >>>> through the >>>> Magnolia filters (by default, it's mapped to / and with >>>> dispatchers on >>>> request, forward AND include) - maybe try adding a bypass for it >>>> in the >>>> global bypasses at /server/filters/bypasses ? >>>> >>>> -g >>>> >>>> On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: >>>> >>>>> >>>>> I had the SiteMesh filter after the Magnolia filter but if I >>>>> move it in >>>>> front I get some partial success. The decorator is applied but >>>>> there is >>>>> an error: >>>>> >>>>> java.lang.IllegalStateException: MgnlContext is not set for this >>>>> thread >>>>> >>>>> and the login screen loads with parts of the decorator applied >>>>> but most >>>>> of it is missing. If I then login I get the following shown in >>>>> Firefox: >>>>> >>>>> Content Encoding Error >>>>> The page you are trying to view cannot be shown because it uses an >>>>> invalid or unsupported form of compression. >>>>> The page you are trying to view cannot be shown because it uses an >>>>> invalid or unsupported form of compression. >>>>> >>>>> I have not been successful in turning off compression in >>>>> Magnolia to >>>>> see >>>>> if that solves this second problem. I have tried to delete the >>>>> gzip >>>>> nodes from: >>>>> >>>>> Config => server => filters => gzip >>>>> >>>>> Config => server => filters => gzip => bypasses => >>>>> contentAllowed => >>>>> allowed >>>>> >>>>> Config => modules => cache =>config => compression => voters >>>>> =>contentType => allowed >>>>> >>>>> But the content still came out with gzip compression. The server >>>>> does >>>>> not have compression enabled so I have no idea where it comes >>>>> from. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Grégory Joseph wrote: >>>>>> >>>>>> Is your sitemesh filter before or after Magnolia's? This might be >>>>>> due to >>>>>> how requests that end up in the admincentral servlets treat the >>>>>> filter >>>>>> chain - can you try to see if /.magnolia/trees/website.html gets >>>>>> decorated, for example ? Or a simpler page such as >>>>>> /.magnolia/pages/configuration.html ? >>>>>> >>>>>> The fact that the login form does not get decorated might be >>>>>> due to >>>>>> the >>>>>> fact that sitemesh treats pages differently depending on the http >>>>>> response code ? (i really don't know if it does, just wild >>>>>> guessing) >>>>>> >>>>>> -g >>>>>> >>>>>> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >>>>>> >>>>>>> >>>>>>> Thanks for taking the time to reply. >>>>>>> >>>>>>> I am trying to get AdminCentral decorated with SiteMesh. >>>>>>> Currently >>>>>>> AdminCentral is not decorated at all. I took a look at the >>>>>>> source and >>>>>>> see that past the login screen a single iframe is used. >>>>>>> However, the >>>>>>> login screen does not seem to use frames and it still is not >>>>>>> decorated. >>>>>>> I added the following to my sitemesh.xml file: >>>>>>> >>>>>>> <mapper >>>>>>> class >>>>>>> = >>>>>>> "com >>>>>>> .opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>>>>>> >>>>>>> >>>>>>> <param name="decorator" value="prosoc-cms-admin" /> >>>>>>> </mapper> >>>>>>> >>>>>>> Where 'prosoc-cms-admin' is the name of the decorator in the >>>>>>> decorator.xml file. My web.xml uses: >>>>>>> >>>>>>> <filter> >>>>>>> <filter-name>sitemesh</filter-name> >>>>>>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</ >>>>>>> filter-class> >>>>>>> >>>>>>> >>>>>>> >>>>>>> </filter> >>>>>>> >>>>>>> <filter-mapping> >>>>>>> <filter-name>sitemesh</filter-name> >>>>>>> <url-pattern>/*</url-pattern> >>>>>>> <dispatcher>REQUEST</dispatcher> >>>>>>> <dispatcher>FORWARD</dispatcher> >>>>>>> </filter-mapping> >>>>>>> >>>>>>> I am not sure why AdminCentral does not get decorated. Any >>>>>>> suggestions >>>>>>> are certainly welcome. >>>>>>> >>>>>>> >>>>>>> >>>>>>> Grégory Joseph wrote: >>>>>>>> >>>>>>>> Hi Gavin, >>>>>>>> >>>>>>>> Any specifics on what the problem(s) is/are ? What are you >>>>>>>> trying to >>>>>>>> achieve specifically ? I suppose you've noticed the >>>>>>>> admincentral is >>>>>>>> built with frames.. and I seem to remember Sitemesh had >>>>>>>> frame-specific >>>>>>>> features/configuration, did you check that ? >>>>>>>> >>>>>>>> -g >>>>>>>> >>>>>>>> >>>>>>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> I have added magnolia onto an existing web app so that it can >>>>>>>>> control a >>>>>>>>> part of the site. The site contains other applications as well >>>>>>>>> (blog, >>>>>>>>> forum etc) and so Sitemesh is used for decoration. I have >>>>>>>>> added >>>>>>>>> SiteMesh >>>>>>>>> to the Magnolia instances and it works perfectly for the >>>>>>>>> 'create' >>>>>>>>> pages >>>>>>>>> in AdminCentral and also for the public instance. I have not >>>>>>>>> been >>>>>>>>> successful in getting SiteMesh to decorate the actual >>>>>>>>> AdminCentral >>>>>>>>> itself though (either public or author) and can't think of any >>>>>>>>> reason >>>>>>>>> why. The SiteMesh decorator is simply: >>>>>>>>> >>>>>>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>>>>>> <pattern>/*</pattern> >>>>>>>>> </decorator> >>>>>>>>> >>>>>>>>> Does anyone have any suggestions or has can say they have >>>>>>>>> successfully >>>>>>>>> managed to decorate AdminCentral? >>>>>>>>> >>>>>>>>> >>>>>>>>> ---------------------------------------------------------------- >>>>>>>>> For list details see >>>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>>>>> > >>>>>>>>> ---------------------------------------------------------------- >>>>>>>> >>>>>>>> >>>>>>>> ---------------------------------------------------------------- >>>>>>>> For list details see >>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>>>> > >>>>>>>> ---------------------------------------------------------------- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> For list details see >>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>>> > >>>>>>> ---------------------------------------------------------------- >>>>>> >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> For list details see >>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>> > >>>>>> ---------------------------------------------------------------- >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@magnolia- >>>>> cms.com> >>>>> ---------------------------------------------------------------- >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>>> >>>> >>>> >>> >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- >> >> >> > > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Activation Problem with RssAggregator moduleHallo List, We are using the magnolia-module-rssaggregator version 1.0-m2 together with magnolia-module-data (1.3) and mgnl-enterprise (4.0.1). When I'm activating a new Rss Aggregator via the data module RSS-Tree, none of the subnodes will be activated. Thus all feeds and filters are missing on the publish instance. This worked fine some weks ago. As I see it this is because there is no activate-incl.-subpages-command available for the RSS aggregator tree (a GenericDataAdminTree). Is this a known problem and/or is there a simple solution? Actually we activate the rss aggregators with the jcr browser but for our clients we would like to have the standard activation working. Thanks a lot Wolf ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Activation Problem with RssAggregator moduleThe issue is caused by the data structure RSSAggregator uses. It's a bug. Please report it in Jira. Thanks, Jan On Mon, 2009-06-22 at 18:41 +0200, Bubenik, Wolf wrote: > Hallo List, > > We are using the magnolia-module-rssaggregator version 1.0-m2 together > with magnolia-module-data (1.3) and mgnl-enterprise (4.0.1). > > When I'm activating a new Rss Aggregator via the data module RSS-Tree, > none of the subnodes will be activated. Thus all feeds and filters are > missing on the publish instance. This worked fine some weks ago. > > As I see it this is because there is no activate-incl.-subpages-command > available for the RSS aggregator tree (a GenericDataAdminTree). > > Is this a known problem and/or is there a simple solution? > > Actually we activate the rss aggregators with the jcr browser but for > our clients we would like to have the standard activation working. > > Thanks a lot > > Wolf > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- Best regards, Jan Haderka Magnolia International Ltd. Meet us at the Magnolia Conference http:/www.magnolia-cms.com/conference Magnolia® - Simple Open Source Content Management ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemVery well spotted with regards to the cmsu:simpleNavigation especially as I never mentioned that. You were correct and by removing the cmsu tags then I can move the SiteMesh filter in front of the Magnolia filter. I also worked out that because I had done a clean install, the gzip node had come back. Dropping that with the SiteMesh filter running first means that I can now get the decorator to run even if the adminCentral is unusable as the javascript seems to fail to run. One thing I am wondering about is the SiteMesh effect on the ajax calls. I know that in one of the other apps that has an ajax captcha I needed to add a blank decorator to the paths that the captcha uses. Without that it would fail. I am unsure what the paths for the ajax calls in magnolia are. If I knew them I could use a blank decorator for them and then maybe the decorator would work with the javascript. I have tried mapping the blank decorator to 'website', 'mgnlTreeControl' and '.resources' but it didn't work. As I now have the ability to decorate adminCentral (not working) I can now compare the layout of the js files as you suggested. They appear to be identical: When Decorated: --------------- The head contains: /article-admin/.magnolia/pages/javascript.js /article-admin/.magnolia/pages/messages.en.js /article-admin/.resources/admin-js/dialogs/dialogs.js /article-admin/.resources/calendar/skins/aqua/theme.css /article-admin/.resources/calendar/calendar.js /article-admin/.resources/calendar/lang/calendar-en.js /article-admin/.resources/calendar/calendar-setup.js The body contains: 1) A call to new MgnlTextField() 2) Calls to new mgnlTree(...) When undecorated: ----------------- The head contains: /article-admin/.magnolia/pages/javascript.js /article-admin/.magnolia/pages/messages.en.js /article-admin/.resources/admin-js/dialogs/dialogs.js /article-admin/.resources/calendar/skins/aqua/theme.css /article-admin/.resources/calendar/calendar.js /article-admin/.resources/calendar/lang/calendar-en.js /article-admin/.resources/calendar/calendar-setup.js The body contains: 1) A call to new MgnlTextField() 2) Calls to new mgnlTree(...) Grégory Joseph wrote: > > Hi, > > > On Jun 21, 2009, at 2:23 PM, Gavin Donald wrote: > >> My apologies for the second email but something has just occurred to me. >> As, when the SM filter is after the Magnolia filter the content managed >> pages get decorated correctly and it is only AdminCentral that does not >> get decorated then does it make sense to say that the SM filter should >> be left after the Magnolia filter? If that is the case then the question >> is why AdminCentral does not get decorated. Unfortunately there are no >> errors as SM does not even appear to get called. > > What surprises me in this scenario is that regular Magnolia pages would > be decorated too. > > Re: your previous email: > What the error message below says, and the stacktrace demonstrates, is > that your decorator jsp file is trying to use Magnolia code, while the > context is not set. This happens because the decoration happens outside > the Magnolia filter chain. > Remove the cmsu:simpleNavigation usage from your decorator, and this > should work. > > If you need to use Magnolia content in your decorator itself, you > probably have no other choice than to setup the SM filter inside the > Magnolia filter chain (config:/server/filters); which will in turn mean > you'll probably have to setup bypasses for your other applications in > there too. > > Cheers, > > -g > > On Jun 21, 2009, at 2:07 PM, Gavin Donald wrote: > >> >> Well, I am not sure what has changed but I now have a different problem. >> The problem I am now seeing was intermittent before but is now continual >> (I did a clean redeploy). The error (below) happens whenever the >> SiteMesh filter is placed before the Magnolis filter. If the SiteMesh >> filter is put after Magnolia filter then AdminCentral functions >> perfectly but is undecorated. The error occurs in the method of >> info.magnolia.context.MgnlContext.AggregationState() which is: >> >> public static AggregationState getAggregationState() { >> final WebContext ctx = getWebContextOrNull(); >> if (ctx != null) { >> return ctx.getAggregationState(); >> } else { >> throw new IllegalStateException("Can only get the >> aggregation state within a WebContext."); >> } >> } >> >> where ctx is null which is because ThreadLocal.get() is returning null >> but to be honest I don't really understand what ThreadLocal.get() >> actually does. >> >> >> ----- START ERROR ----- >> 21-Jun-2009 12:48:32 org.apache.catalina.core.ApplicationDispatcher >> invoke >> SEVERE: Servlet.service() for servlet jsp threw exception >> java.lang.IllegalStateException: Can only get the aggregation state >> within a WebContext. >> at >> info.magnolia.context.MgnlContext.getAggregationState(MgnlContext.java:221) >> >> at >> info.magnolia.cms.taglibs.Resource.getCurrentActivePage(Resource.java:89) >> at >> info.magnolia.cms.taglibs.util.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java:350) >> >> at >> org.apache.jsp.prosoc_002dview.decorator.decorator_002dprosoc_002dcms_002dpublic_jsp._jspx_meth_cmsu_005fsimpleNavigation_005f0(decorator_002dprosoc_002dcms_002dpublic_jsp.java:893) >> >> at >> org.apache.jsp.prosoc_002dview.decorator.decorator_002dprosoc_002dcms_002dpublic_jsp._jspService(decorator_002dprosoc_002dcms_002dpublic_jsp.java:312) >> >> at >> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) >> >> at >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) >> at >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> >> at >> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) >> >> at >> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535) >> >> at >> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) >> >> at >> com.opensymphony.module.sitemesh.filter.PageFilter.writeDecorator(PageFilter.java:173) >> >> at >> com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:158) >> >> at >> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) >> >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >> >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >> >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >> >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >> >> at >> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >> >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) >> >> at >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) >> >> at >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) >> >> at >> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) >> at java.lang.Thread.run(Thread.java:619) >> 21-Jun-2009 12:48:32 org.apache.catalina.core.StandardWrapperValve invoke >> SEVERE: Servlet.service() for servlet default threw exception >> java.lang.IllegalStateException: Can only get the aggregation state >> within a WebContext. >> at >> info.magnolia.context.MgnlContext.getAggregationState(MgnlContext.java:221) >> >> at >> info.magnolia.cms.taglibs.Resource.getCurrentActivePage(Resource.java:89) >> at >> info.magnolia.cms.taglibs.util.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java:350) >> >> at >> org.apache.jsp.prosoc_002dview.decorator.decorator_002dprosoc_002dcms_002dpublic_jsp._jspx_meth_cmsu_005fsimpleNavigation_005f0(decorator_002dprosoc_002dcms_002dpublic_jsp.java:893) >> >> at >> org.apache.jsp.prosoc_002dview.decorator.decorator_002dprosoc_002dcms_002dpublic_jsp._jspService(decorator_002dprosoc_002dcms_002dpublic_jsp.java:312) >> >> at >> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) >> >> at >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) >> at >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> >> at >> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) >> >> at >> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535) >> >> at >> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) >> >> at >> com.opensymphony.module.sitemesh.filter.PageFilter.writeDecorator(PageFilter.java:173) >> >> at >> com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:158) >> >> at >> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) >> >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) >> >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >> >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >> >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >> >> at >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >> >> at >> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) >> at >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >> >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) >> >> at >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) >> >> at >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) >> >> at >> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) >> at java.lang.Thread.run(Thread.java:619) >> ----- END ERROR ----- >> >> >> >> >> >> >> >> Grégory Joseph wrote: >>> >>> Hi again, >>> >>> Haaa this is getting frustrating, because I've been willing to integrate >>> Sitemesh and Magnolia ever since I started working with the latter (and >>> had to abandon previous projects using the former) >>> >>> Hopefully helpful suggestions inline: >>> >>> On Jun 19, 2009, at 1:41 PM, Gavin Donald wrote: >>> >>>> >>>> Thanks for the additional ideas. I have tried them as far as I could >>>> and >>>> could not get it to work. >>>> >>>> The use case is that the site has several web applications running >>>> on it >>>> (Apache Roller , MVNForum, Magnolia as well as a custom core that >>>> provides site specific facilities). The public and admin sections of >>>> each of those application is SiteMesh decorated and so it would keep >>>> everything looking the same if the Magnolia AdminCentral was also >>>> decorated. The decorators also contain the shared navigation sections >>>> and so if a user enters AdminCentral they loose all the navigation >>>> elements that let them easily move between the different applications. >>> >>> Makes a lot of sense. >>> >>>> >>>> I added the following: >>>> >>>> Server/filters/bypasses >>>> Content-node: sitemesh-decorator >>>> data-node: class => info.magnploa.voting.voters.URIStartsWithVoter >>>> data-node: pattern: => /prosoc-view/decorator >>> >>> Providing the typo was only in the email and not in your config, this >>> looks correct. >>> >>>> I have looked at the source in the browser and then called each of the >>>> JS files in turn. Non of them are decorated and all are present >>>> including the: >>>> >>>> /.magnolia/pages/javascript.js >>>> >>>> I mention that file specifically because when SiteMesh is active and I >>>> call /magnolia/trees/website.html I get an error in the JavaScript >>>> console saying that 'MgnlTextField' could not be found. This JavaScript >>>> call is called from near the bottom of website.html and the function is >>>> defined in javascript.js. >>> >>> That could indicate what I was suspecting about Sitemesh rearranging the >>> script tags in the <head> - see below. >>> >>> >>>> I have added: >>>> >>>> <excludes> >>>> <pattern>*.js</pattern> >>>> </excludes> >>>> >>>> to the decorators.xml file. >>>> >>>> You mentioned: >>>> >>>> "Depending on your decorator/configuration, it might also be that >>>> Sitemesh tries to reorganize the script tags, for instance. If I >>>> remember correctly from when I used it before, it's sort of its >>>> default >>>> behaviour, because you'll usually want to insert stuff in the <head> >>>> tags. Can you disable that? Or bypass it altogether for the whole >>>> /.magnolia and /.resources, for instance ?" >>>> >>>> but I didn't really understand how to do that. >>> >>> Well - I don't really know either, been quite a while since I used >>> Sitemesh. >>> What I seem to remember is that you could feed it with a page that has, >>> for instance, <script> and <style> tags lying around in the <body> tag, >>> and Sitemesh would nicely rearrange them inside the <head> tag of the >>> page. >>> If that happens, there might be a few bits and pieces that don't work >>> anymore (typically, inline javascript within the page that would expect >>> to have some methods or object available - if the order of the scripts >>> is modified, things might start to get hairy) >>> >>> Could you compare the results of an undecorated and decorated >>> /.magnolia/trees/website.html with that in mind ? >>> >>>> When I put the SiteMesh filter before the magnolia filter I frequently >>>> get: >>>> >>>> MgnlContext is not set for this thread >>> <...> >>> To understand what goes wrong there, we'd need a few more lines of the >>> exception - could you attach a sample to your email, or paste it on >>> nopaste.org ? If your Magnolia instance runs fine on its own (without >>> SM), I can't really see why this would happen with SM --- at least not >>> without more details or trying out myself ... >>> >>>> If you have any other ideas then I would be happy to try them but as I >>>> am out of things to try then I will probably leave AdminCentral >>>> undecorated for now. Thanks for your previous suggestions. >>> >>> Is there a chance we could see your decorator.jsp; maybe it'd remind me >>> a few other things I forgot about SM... >>> >>> Cheers, >>> >>> -g >>> >>> Grégory Joseph wrote: >>>>> >>>>> Gavin, >>>>> >>>>> Something hit me: your decorator jsp itself might be going through the >>>>> Magnolia filters (by default, it's mapped to / and with dispatchers on >>>>> request, forward AND include) - maybe try adding a bypass for it in >>>>> the >>>>> global bypasses at /server/filters/bypasses ? >>>>> >>>>> -g >>>>> >>>>> On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: >>>>> >>>>>> >>>>>> I had the SiteMesh filter after the Magnolia filter but if I move >>>>>> it in >>>>>> front I get some partial success. The decorator is applied but >>>>>> there is >>>>>> an error: >>>>>> >>>>>> java.lang.IllegalStateException: MgnlContext is not set for this >>>>>> thread >>>>>> >>>>>> and the login screen loads with parts of the decorator applied but >>>>>> most >>>>>> of it is missing. If I then login I get the following shown in >>>>>> Firefox: >>>>>> >>>>>> Content Encoding Error >>>>>> The page you are trying to view cannot be shown because it uses an >>>>>> invalid or unsupported form of compression. >>>>>> The page you are trying to view cannot be shown because it uses an >>>>>> invalid or unsupported form of compression. >>>>>> >>>>>> I have not been successful in turning off compression in Magnolia to >>>>>> see >>>>>> if that solves this second problem. I have tried to delete the gzip >>>>>> nodes from: >>>>>> >>>>>> Config => server => filters => gzip >>>>>> >>>>>> Config => server => filters => gzip => bypasses => contentAllowed => >>>>>> allowed >>>>>> >>>>>> Config => modules => cache =>config => compression => voters >>>>>> =>contentType => allowed >>>>>> >>>>>> But the content still came out with gzip compression. The server does >>>>>> not have compression enabled so I have no idea where it comes from. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Grégory Joseph wrote: >>>>>>> >>>>>>> Is your sitemesh filter before or after Magnolia's? This might be >>>>>>> due to >>>>>>> how requests that end up in the admincentral servlets treat the >>>>>>> filter >>>>>>> chain - can you try to see if /.magnolia/trees/website.html gets >>>>>>> decorated, for example ? Or a simpler page such as >>>>>>> /.magnolia/pages/configuration.html ? >>>>>>> >>>>>>> The fact that the login form does not get decorated might be due to >>>>>>> the >>>>>>> fact that sitemesh treats pages differently depending on the http >>>>>>> response code ? (i really don't know if it does, just wild guessing) >>>>>>> >>>>>>> -g >>>>>>> >>>>>>> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >>>>>>> >>>>>>>> >>>>>>>> Thanks for taking the time to reply. >>>>>>>> >>>>>>>> I am trying to get AdminCentral decorated with SiteMesh. Currently >>>>>>>> AdminCentral is not decorated at all. I took a look at the >>>>>>>> source and >>>>>>>> see that past the login screen a single iframe is used. However, >>>>>>>> the >>>>>>>> login screen does not seem to use frames and it still is not >>>>>>>> decorated. >>>>>>>> I added the following to my sitemesh.xml file: >>>>>>>> >>>>>>>> <mapper >>>>>>>> class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> <param name="decorator" value="prosoc-cms-admin" /> >>>>>>>> </mapper> >>>>>>>> >>>>>>>> Where 'prosoc-cms-admin' is the name of the decorator in the >>>>>>>> decorator.xml file. My web.xml uses: >>>>>>>> >>>>>>>> <filter> >>>>>>>> <filter-name>sitemesh</filter-name> >>>>>>>> <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> </filter> >>>>>>>> >>>>>>>> <filter-mapping> >>>>>>>> <filter-name>sitemesh</filter-name> >>>>>>>> <url-pattern>/*</url-pattern> >>>>>>>> <dispatcher>REQUEST</dispatcher> >>>>>>>> <dispatcher>FORWARD</dispatcher> >>>>>>>> </filter-mapping> >>>>>>>> >>>>>>>> I am not sure why AdminCentral does not get decorated. Any >>>>>>>> suggestions >>>>>>>> are certainly welcome. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Grégory Joseph wrote: >>>>>>>>> >>>>>>>>> Hi Gavin, >>>>>>>>> >>>>>>>>> Any specifics on what the problem(s) is/are ? What are you >>>>>>>>> trying to >>>>>>>>> achieve specifically ? I suppose you've noticed the >>>>>>>>> admincentral is >>>>>>>>> built with frames.. and I seem to remember Sitemesh had >>>>>>>>> frame-specific >>>>>>>>> features/configuration, did you check that ? >>>>>>>>> >>>>>>>>> -g >>>>>>>>> >>>>>>>>> >>>>>>>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> I have added magnolia onto an existing web app so that it can >>>>>>>>>> control a >>>>>>>>>> part of the site. The site contains other applications as well >>>>>>>>>> (blog, >>>>>>>>>> forum etc) and so Sitemesh is used for decoration. I have added >>>>>>>>>> SiteMesh >>>>>>>>>> to the Magnolia instances and it works perfectly for the 'create' >>>>>>>>>> pages >>>>>>>>>> in AdminCentral and also for the public instance. I have not been >>>>>>>>>> successful in getting SiteMesh to decorate the actual >>>>>>>>>> AdminCentral >>>>>>>>>> itself though (either public or author) and can't think of any >>>>>>>>>> reason >>>>>>>>>> why. The SiteMesh decorator is simply: >>>>>>>>>> >>>>>>>>>> <decorator name="prosoc-cms" page="decorator-prosoc-cms.jsp"> >>>>>>>>>> <pattern>/*</pattern> >>>>>>>>>> </decorator> >>>>>>>>>> >>>>>>>>>> Does anyone have any suggestions or has can say they have >>>>>>>>>> successfully >>>>>>>>>> managed to decorate AdminCentral? >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ---------------------------------------------------------------- >>>>>>>>>> For list details see >>>>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>>> <user-list-unsubscribe@...> >>>>>>>>>> ---------------------------------------------------------------- >>>>>>>>> >>>>>>>>> >>>>>>>>> ---------------------------------------------------------------- >>>>>>>>> For list details see >>>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>> <user-list-unsubscribe@...> >>>>>>>>> ---------------------------------------------------------------- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ---------------------------------------------------------------- >>>>>>>> For list details see >>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>>>> ---------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> For list details see >>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>>> ---------------------------------------------------------------- >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> For list details see >>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>>> ---------------------------------------------------------------- >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>>> ---------------------------------------------------------------- >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >>> >>> >>> >> >> >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
|
|
Re: Sitemesh integration problemOn Jun 23, 2009, at 2:39 PM, Gavin Donald wrote: > > Very well spotted with regards to the cmsu:simpleNavigation especially > as I never mentioned that. You were correct and by removing the cmsu > tags then I can move the SiteMesh filter in front of the Magnolia > filter. > > I also worked out that because I had done a clean install, the gzip > node > had come back. Dropping that with the SiteMesh filter running first > means that I can now get the decorator to run even if the adminCentral > is unusable as the javascript seems to fail to run. > > One thing I am wondering about is the SiteMesh effect on the ajax > calls. > I know that in one of the other apps that has an ajax captcha I needed > to add a blank decorator to the paths that the captcha uses. Without > that it would fail. Unfortunately I don't think there's a clear url pattern for the ajax calls atm - it's differentiated through a request parameter. Maybe SM can choose a different decorator based on that - isn't that what ParameterDecoratorMapper is for ? > I am unsure what the paths for the ajax calls in > magnolia are. If I knew them I could use a blank decorator for them > and > then maybe the decorator would work with the javascript. I have tried > mapping the blank decorator to 'website', 'mgnlTreeControl' and > '.resources' but it didn't work. > > As I now have the ability to decorate adminCentral (not working) I can > now compare the layout of the js files as you suggested. They appear > to > be identical: > > When Decorated: > --------------- > > The head contains: > /article-admin/.magnolia/pages/javascript.js > /article-admin/.magnolia/pages/messages.en.js > /article-admin/.resources/admin-js/dialogs/dialogs.js > /article-admin/.resources/calendar/skins/aqua/theme.css > /article-admin/.resources/calendar/calendar.js > /article-admin/.resources/calendar/lang/calendar-en.js > /article-admin/.resources/calendar/calendar-setup.js > > The body contains: > 1) A call to new MgnlTextField() > 2) Calls to new mgnlTree(...) > > > When undecorated: > ----------------- > > The head contains: > /article-admin/.magnolia/pages/javascript.js > /article-admin/.magnolia/pages/messages.en.js > /article-admin/.resources/admin-js/dialogs/dialogs.js > /article-admin/.resources/calendar/skins/aqua/theme.css > /article-admin/.resources/calendar/calendar.js > /article-admin/.resources/calendar/lang/calendar-en.js > /article-admin/.resources/calendar/calendar-setup.js > > The body contains: > 1) A call to new MgnlTextField() > 2) Calls to new mgnlTree(...) > > > > > > Grégory Joseph wrote: >> >> Hi, >> >> >> On Jun 21, 2009, at 2:23 PM, Gavin Donald wrote: >> >>> My apologies for the second email but something has just occurred >>> to me. >>> As, when the SM filter is after the Magnolia filter the content >>> managed >>> pages get decorated correctly and it is only AdminCentral that >>> does not >>> get decorated then does it make sense to say that the SM filter >>> should >>> be left after the Magnolia filter? If that is the case then the >>> question >>> is why AdminCentral does not get decorated. Unfortunately there >>> are no >>> errors as SM does not even appear to get called. >> >> What surprises me in this scenario is that regular Magnolia pages >> would >> be decorated too. >> >> Re: your previous email: >> What the error message below says, and the stacktrace demonstrates, >> is >> that your decorator jsp file is trying to use Magnolia code, while >> the >> context is not set. This happens because the decoration happens >> outside >> the Magnolia filter chain. >> Remove the cmsu:simpleNavigation usage from your decorator, and this >> should work. >> >> If you need to use Magnolia content in your decorator itself, you >> probably have no other choice than to setup the SM filter inside the >> Magnolia filter chain (config:/server/filters); which will in turn >> mean >> you'll probably have to setup bypasses for your other applications in >> there too. >> >> Cheers, >> >> -g >> >> On Jun 21, 2009, at 2:07 PM, Gavin Donald wrote: >> >>> >>> Well, I am not sure what has changed but I now have a different >>> problem. >>> The problem I am now seeing was intermittent before but is now >>> continual >>> (I did a clean redeploy). The error (below) happens whenever the >>> SiteMesh filter is placed before the Magnolis filter. If the >>> SiteMesh >>> filter is put after Magnolia filter then AdminCentral functions >>> perfectly but is undecorated. The error occurs in the method of >>> info.magnolia.context.MgnlContext.AggregationState() which is: >>> >>> public static AggregationState getAggregationState() { >>> final WebContext ctx = getWebContextOrNull(); >>> if (ctx != null) { >>> return ctx.getAggregationState(); >>> } else { >>> throw new IllegalStateException("Can only get the >>> aggregation state within a WebContext."); >>> } >>> } >>> >>> where ctx is null which is because ThreadLocal.get() is returning >>> null >>> but to be honest I don't really understand what ThreadLocal.get() >>> actually does. >>> >>> >>> ----- START ERROR ----- >>> 21-Jun-2009 12:48:32 org.apache.catalina.core.ApplicationDispatcher >>> invoke >>> SEVERE: Servlet.service() for servlet jsp threw exception >>> java.lang.IllegalStateException: Can only get the aggregation state >>> within a WebContext. >>> at >>> info >>> .magnolia.context.MgnlContext.getAggregationState(MgnlContext.java: >>> 221) >>> >>> at >>> info >>> .magnolia.cms.taglibs.Resource.getCurrentActivePage(Resource.java: >>> 89) >>> at >>> info >>> .magnolia >>> .cms >>> .taglibs >>> .util.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java:350) >>> >>> at >>> org >>> .apache >>> .jsp >>> .prosoc_002dview >>> .decorator >>> .decorator_002dprosoc_002dcms_002dpublic_jsp >>> ._jspx_meth_cmsu_005fsimpleNavigation_005f0 >>> (decorator_002dprosoc_002dcms_002dpublic_jsp.java:893) >>> >>> at >>> org >>> .apache >>> .jsp >>> .prosoc_002dview >>> .decorator >>> .decorator_002dprosoc_002dcms_002dpublic_jsp >>> ._jspService(decorator_002dprosoc_002dcms_002dpublic_jsp.java:312) >>> >>> at >>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java: >>> 717) >>> at >>> org >>> .apache >>> .jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: >>> 374) >>> >>> at >>> org >>> .apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: >>> 342) >>> at >>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java: >>> 717) >>> at >>> org >>> .apache >>> .catalina >>> .core >>> .ApplicationFilterChain >>> .internalDoFilter(ApplicationFilterChain.java:290) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: >>> 206) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java: >>> 535) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) >>> >>> at >>> com >>> .opensymphony >>> .module.sitemesh.filter.PageFilter.writeDecorator(PageFilter.java: >>> 173) >>> >>> at >>> com >>> .opensymphony >>> .module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java: >>> 158) >>> >>> at >>> com >>> .opensymphony >>> .module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core >>> .ApplicationFilterChain >>> .internalDoFilter(ApplicationFilterChain.java:235) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: >>> 206) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.StandardContextValve.invoke(StandardContextValve.java:191) >>> >>> at >>> org >>> .apache >>> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >>> >>> at >>> org >>> .apache >>> .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >>> >>> at >>> org >>> .apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: >>> 568) >>> at >>> org >>> .apache >>> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: >>> 109) >>> >>> at >>> org >>> .apache >>> .catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) >>> >>> at >>> org >>> .apache.coyote.http11.Http11Processor.process(Http11Processor.java: >>> 845) >>> >>> at >>> org.apache.coyote.http11.Http11Protocol >>> $Http11ConnectionHandler.process(Http11Protocol.java:583) >>> >>> at >>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: >>> 447) >>> at java.lang.Thread.run(Thread.java:619) >>> 21-Jun-2009 12:48:32 org.apache.catalina.core.StandardWrapperValve >>> invoke >>> SEVERE: Servlet.service() for servlet default threw exception >>> java.lang.IllegalStateException: Can only get the aggregation state >>> within a WebContext. >>> at >>> info >>> .magnolia.context.MgnlContext.getAggregationState(MgnlContext.java: >>> 221) >>> >>> at >>> info >>> .magnolia.cms.taglibs.Resource.getCurrentActivePage(Resource.java: >>> 89) >>> at >>> info >>> .magnolia >>> .cms >>> .taglibs >>> .util.SimpleNavigationTag.doEndTag(SimpleNavigationTag.java:350) >>> >>> at >>> org >>> .apache >>> .jsp >>> .prosoc_002dview >>> .decorator >>> .decorator_002dprosoc_002dcms_002dpublic_jsp >>> ._jspx_meth_cmsu_005fsimpleNavigation_005f0 >>> (decorator_002dprosoc_002dcms_002dpublic_jsp.java:893) >>> >>> at >>> org >>> .apache >>> .jsp >>> .prosoc_002dview >>> .decorator >>> .decorator_002dprosoc_002dcms_002dpublic_jsp >>> ._jspService(decorator_002dprosoc_002dcms_002dpublic_jsp.java:312) >>> >>> at >>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java: >>> 717) >>> at >>> org >>> .apache >>> .jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: >>> 374) >>> >>> at >>> org >>> .apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: >>> 342) >>> at >>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java: >>> 717) >>> at >>> org >>> .apache >>> .catalina >>> .core >>> .ApplicationFilterChain >>> .internalDoFilter(ApplicationFilterChain.java:290) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: >>> 206) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java: >>> 535) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) >>> >>> at >>> com >>> .opensymphony >>> .module.sitemesh.filter.PageFilter.writeDecorator(PageFilter.java: >>> 173) >>> >>> at >>> com >>> .opensymphony >>> .module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java: >>> 158) >>> >>> at >>> com >>> .opensymphony >>> .module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core >>> .ApplicationFilterChain >>> .internalDoFilter(ApplicationFilterChain.java:235) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: >>> 206) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >>> >>> at >>> org >>> .apache >>> .catalina >>> .core.StandardContextValve.invoke(StandardContextValve.java:191) >>> >>> at >>> org >>> .apache >>> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >>> >>> at >>> org >>> .apache >>> .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >>> >>> at >>> org >>> .apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: >>> 568) >>> at >>> org >>> .apache >>> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: >>> 109) >>> >>> at >>> org >>> .apache >>> .catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) >>> >>> at >>> org >>> .apache.coyote.http11.Http11Processor.process(Http11Processor.java: >>> 845) >>> >>> at >>> org.apache.coyote.http11.Http11Protocol >>> $Http11ConnectionHandler.process(Http11Protocol.java:583) >>> >>> at >>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: >>> 447) >>> at java.lang.Thread.run(Thread.java:619) >>> ----- END ERROR ----- >>> >>> >>> >>> >>> >>> >>> >>> Grégory Joseph wrote: >>>> >>>> Hi again, >>>> >>>> Haaa this is getting frustrating, because I've been willing to >>>> integrate >>>> Sitemesh and Magnolia ever since I started working with the >>>> latter (and >>>> had to abandon previous projects using the former) >>>> >>>> Hopefully helpful suggestions inline: >>>> >>>> On Jun 19, 2009, at 1:41 PM, Gavin Donald wrote: >>>> >>>>> >>>>> Thanks for the additional ideas. I have tried them as far as I >>>>> could >>>>> and >>>>> could not get it to work. >>>>> >>>>> The use case is that the site has several web applications running >>>>> on it >>>>> (Apache Roller , MVNForum, Magnolia as well as a custom core that >>>>> provides site specific facilities). The public and admin >>>>> sections of >>>>> each of those application is SiteMesh decorated and so it would >>>>> keep >>>>> everything looking the same if the Magnolia AdminCentral was also >>>>> decorated. The decorators also contain the shared navigation >>>>> sections >>>>> and so if a user enters AdminCentral they loose all the navigation >>>>> elements that let them easily move between the different >>>>> applications. >>>> >>>> Makes a lot of sense. >>>> >>>>> >>>>> I added the following: >>>>> >>>>> Server/filters/bypasses >>>>> Content-node: sitemesh-decorator >>>>> data-node: class => info.magnploa.voting.voters.URIStartsWithVoter >>>>> data-node: pattern: => /prosoc-view/decorator >>>> >>>> Providing the typo was only in the email and not in your config, >>>> this >>>> looks correct. >>>> >>>>> I have looked at the source in the browser and then called each >>>>> of the >>>>> JS files in turn. Non of them are decorated and all are present >>>>> including the: >>>>> >>>>> /.magnolia/pages/javascript.js >>>>> >>>>> I mention that file specifically because when SiteMesh is active >>>>> and I >>>>> call /magnolia/trees/website.html I get an error in the JavaScript >>>>> console saying that 'MgnlTextField' could not be found. This >>>>> JavaScript >>>>> call is called from near the bottom of website.html and the >>>>> function is >>>>> defined in javascript.js. >>>> >>>> That could indicate what I was suspecting about Sitemesh >>>> rearranging the >>>> script tags in the <head> - see below. >>>> >>>> >>>>> I have added: >>>>> >>>>> <excludes> >>>>> <pattern>*.js</pattern> >>>>> </excludes> >>>>> >>>>> to the decorators.xml file. >>>>> >>>>> You mentioned: >>>>> >>>>> "Depending on your decorator/configuration, it might also be that >>>>> Sitemesh tries to reorganize the script tags, for instance. If I >>>>> remember correctly from when I used it before, it's sort of its >>>>> default >>>>> behaviour, because you'll usually want to insert stuff in the >>>>> <head> >>>>> tags. Can you disable that? Or bypass it altogether for the whole >>>>> /.magnolia and /.resources, for instance ?" >>>>> >>>>> but I didn't really understand how to do that. >>>> >>>> Well - I don't really know either, been quite a while since I used >>>> Sitemesh. >>>> What I seem to remember is that you could feed it with a page >>>> that has, >>>> for instance, <script> and <style> tags lying around in the >>>> <body> tag, >>>> and Sitemesh would nicely rearrange them inside the <head> tag of >>>> the >>>> page. >>>> If that happens, there might be a few bits and pieces that don't >>>> work >>>> anymore (typically, inline javascript within the page that would >>>> expect >>>> to have some methods or object available - if the order of the >>>> scripts >>>> is modified, things might start to get hairy) >>>> >>>> Could you compare the results of an undecorated and decorated >>>> /.magnolia/trees/website.html with that in mind ? >>>> >>>>> When I put the SiteMesh filter before the magnolia filter I >>>>> frequently >>>>> get: >>>>> >>>>> MgnlContext is not set for this thread >>>> <...> >>>> To understand what goes wrong there, we'd need a few more lines >>>> of the >>>> exception - could you attach a sample to your email, or paste it on >>>> nopaste.org ? If your Magnolia instance runs fine on its own >>>> (without >>>> SM), I can't really see why this would happen with SM --- at >>>> least not >>>> without more details or trying out myself ... >>>> >>>>> If you have any other ideas then I would be happy to try them >>>>> but as I >>>>> am out of things to try then I will probably leave AdminCentral >>>>> undecorated for now. Thanks for your previous suggestions. >>>> >>>> Is there a chance we could see your decorator.jsp; maybe it'd >>>> remind me >>>> a few other things I forgot about SM... >>>> >>>> Cheers, >>>> >>>> -g >>>> >>>> Grégory Joseph wrote: >>>>>> >>>>>> Gavin, >>>>>> >>>>>> Something hit me: your decorator jsp itself might be going >>>>>> through the >>>>>> Magnolia filters (by default, it's mapped to / and with >>>>>> dispatchers on >>>>>> request, forward AND include) - maybe try adding a bypass for >>>>>> it in >>>>>> the >>>>>> global bypasses at /server/filters/bypasses ? >>>>>> >>>>>> -g >>>>>> >>>>>> On Jun 16, 2009, at 9:55 PM, Gavin Donald wrote: >>>>>> >>>>>>> >>>>>>> I had the SiteMesh filter after the Magnolia filter but if I >>>>>>> move >>>>>>> it in >>>>>>> front I get some partial success. The decorator is applied but >>>>>>> there is >>>>>>> an error: >>>>>>> >>>>>>> java.lang.IllegalStateException: MgnlContext is not set for this >>>>>>> thread >>>>>>> >>>>>>> and the login screen loads with parts of the decorator applied >>>>>>> but >>>>>>> most >>>>>>> of it is missing. If I then login I get the following shown in >>>>>>> Firefox: >>>>>>> >>>>>>> Content Encoding Error >>>>>>> The page you are trying to view cannot be shown because it >>>>>>> uses an >>>>>>> invalid or unsupported form of compression. >>>>>>> The page you are trying to view cannot be shown because it >>>>>>> uses an >>>>>>> invalid or unsupported form of compression. >>>>>>> >>>>>>> I have not been successful in turning off compression in >>>>>>> Magnolia to >>>>>>> see >>>>>>> if that solves this second problem. I have tried to delete the >>>>>>> gzip >>>>>>> nodes from: >>>>>>> >>>>>>> Config => server => filters => gzip >>>>>>> >>>>>>> Config => server => filters => gzip => bypasses => >>>>>>> contentAllowed => >>>>>>> allowed >>>>>>> >>>>>>> Config => modules => cache =>config => compression => voters >>>>>>> =>contentType => allowed >>>>>>> >>>>>>> But the content still came out with gzip compression. The >>>>>>> server does >>>>>>> not have compression enabled so I have no idea where it comes >>>>>>> from. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Grégory Joseph wrote: >>>>>>>> >>>>>>>> Is your sitemesh filter before or after Magnolia's? This >>>>>>>> might be >>>>>>>> due to >>>>>>>> how requests that end up in the admincentral servlets treat the >>>>>>>> filter >>>>>>>> chain - can you try to see if /.magnolia/trees/website.html >>>>>>>> gets >>>>>>>> decorated, for example ? Or a simpler page such as >>>>>>>> /.magnolia/pages/configuration.html ? >>>>>>>> >>>>>>>> The fact that the login form does not get decorated might be >>>>>>>> due to >>>>>>>> the >>>>>>>> fact that sitemesh treats pages differently depending on the >>>>>>>> http >>>>>>>> response code ? (i really don't know if it does, just wild >>>>>>>> guessing) >>>>>>>> >>>>>>>> -g >>>>>>>> >>>>>>>> On Jun 16, 2009, at 12:39 PM, Gavin Donald wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> Thanks for taking the time to reply. >>>>>>>>> >>>>>>>>> I am trying to get AdminCentral decorated with SiteMesh. >>>>>>>>> Currently >>>>>>>>> AdminCentral is not decorated at all. I took a look at the >>>>>>>>> source and >>>>>>>>> see that past the login screen a single iframe is used. >>>>>>>>> However, >>>>>>>>> the >>>>>>>>> login screen does not seem to use frames and it still is not >>>>>>>>> decorated. >>>>>>>>> I added the following to my sitemesh.xml file: >>>>>>>>> >>>>>>>>> <mapper >>>>>>>>> class >>>>>>>>> = >>>>>>>>> "com >>>>>>>>> .opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> <param name="decorator" value="prosoc-cms-admin" /> >>>>>>>>> </mapper> >>>>>>>>> >>>>>>>>> Where 'prosoc-cms-admin' is the name of the decorator in the >>>>>>>>> decorator.xml file. My web.xml uses: >>>>>>>>> >>>>>>>>> <filter> >>>>>>>>> <filter-name>sitemesh</filter-name> >>>>>>>>> <filter- >>>>>>>>> class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</ >>>>>>>>> filter-class> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> </filter> >>>>>>>>> >>>>>>>>> <filter-mapping> >>>>>>>>> <filter-name>sitemesh</filter-name> >>>>>>>>> <url-pattern>/*</url-pattern> >>>>>>>>> <dispatcher>REQUEST</dispatcher> >>>>>>>>> <dispatcher>FORWARD</dispatcher> >>>>>>>>> </filter-mapping> >>>>>>>>> >>>>>>>>> I am not sure why AdminCentral does not get decorated. Any >>>>>>>>> suggestions >>>>>>>>> are certainly welcome. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Grégory Joseph wrote: >>>>>>>>>> >>>>>>>>>> Hi Gavin, >>>>>>>>>> >>>>>>>>>> Any specifics on what the problem(s) is/are ? What are you >>>>>>>>>> trying to >>>>>>>>>> achieve specifically ? I suppose you've noticed the >>>>>>>>>> admincentral is >>>>>>>>>> built with frames.. and I seem to remember Sitemesh had >>>>>>>>>> frame-specific >>>>>>>>>> features/configuration, did you check that ? >>>>>>>>>> >>>>>>>>>> -g >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Jun 14, 2009, at 4:56 PM, Gavin Donald wrote: >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have added magnolia onto an existing web app so that it >>>>>>>>>>> can >>>>>>>>>>> control a >>>>>>>>>>> part of the site. The site contains other applications as >>>>>>>>>>> well >>>>>>>>>>> (blog, >>>>>>>>>>> forum etc) and so Sitemesh is used for decoration. I have >>>>>>>>>>> added >>>>>>>>>>> SiteMesh >>>>>>>>>>> to the Magnolia instances and it works perfectly for the >>>>>>>>>>> 'create' >>>>>>>>>>> pages >>>>>>>>>>> in AdminCentral and also for the public instance. I have >>>>>>>>>>> not been >>>>>>>>>>> successful in getting SiteMesh to decorate the actual >>>>>>>>>>> AdminCentral >>>>>>>>>>> itself though (either public or author) and can't think of >>>>>>>>>>> any >>>>>>>>>>> reason >>>>>>>>>>> why. The SiteMesh decorator is simply: >>>>>>>>>>> >>>>>>>>>>> <decorator name="prosoc-cms" page="decorator-prosoc- >>>>>>>>>>> cms.jsp"> >>>>>>>>>>> <pattern>/*</pattern> >>>>>>>>>>> </decorator> >>>>>>>>>>> >>>>>>>>>>> Does anyone have any suggestions or has can say they have >>>>>>>>>>> successfully >>>>>>>>>>> managed to decorate AdminCentral? >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ---------------------------------------------------------------- >>>>>>>>>>> For list details see >>>>>>>>>>> http://www.magnolia-cms.com/home/community/mailing- >>>>>>>>>>> lists.html >>>>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>>>> <user-list-unsubscribe@...> >>>>>>>>>>> ---------------------------------------------------------------- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ---------------------------------------------------------------- >>>>>>>>>> For list details see >>>>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>>> <user-list-unsubscribe@...> >>>>>>>>>> ---------------------------------------------------------------- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ---------------------------------------------------------------- >>>>>>>>> For list details see >>>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>>>>> > >>>>>>>>> ---------------------------------------------------------------- >>>>>>>> >>>>>>>> >>>>>>>> ---------------------------------------------------------------- >>>>>>>> For list details see >>>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>>>> > >>>>>>>> ---------------------------------------------------------------- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ---------------------------------------------------------------- >>>>>>> For list details see >>>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>>> > >>>>>>> ---------------------------------------------------------------- >>>>>> >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> For list details see >>>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@... >>>>>> > >>>>>> ---------------------------------------------------------------- >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> ---------------------------------------------------------------- >>>>> For list details see >>>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>>> To unsubscribe, E-mail to: <user-list-unsubscribe@magnolia- >>>>> cms.com> >>>>> ---------------------------------------------------------------- >>>> >>>> >>>> ---------------------------------------------------------------- >>>> For list details see >>>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>>> ---------------------------------------------------------------- >>>> >>>> >>>> >>> >>> >>> >>> >>> ---------------------------------------------------------------- >>> For list details see >>> http://www.magnolia-cms.com/home/community/mailing-lists.html >>> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >>> ---------------------------------------------------------------- >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscribe@...> >> ---------------------------------------------------------------- >> >> >> > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscribe@...> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscribe@...> ---------------------------------------------------------------- |
| Free embeddable forum powered by Nabble | Forum Help |