The SnsFtlDebugger Plugin assists you in customizing Jive SBS. It can help you find out which Freemarker Templates were used to render individual Jive SBS pages. It can also help you locate a template file that you want to edit and describe where the template originated from (theme, plugin, or system file).
Features
How To Use
Notes
Thanks! It sure has saved me a chunk of time when searching around for templates.
Hi: Can someone please explain to me how to get to the main page to view the instructions?
Hi Abhijeet,
After installing the plugin and restarting Clearspace, you just need to go to jiveUrl/ftldebugger.jspa, which for you might be something like this:
http://localhost:8080/clearspace/ftldebugger.jspa
-Jon
Jive Certified Clearspace Developer
I did just that but all I get is "Web page cannot be found"
I just downloaded the plugin jar from this page and installed it on a running instance of Clearspace 2.5.3, restarted the instance and logged in. I was able to access the ftldebugger at:
http://localhost:8080/clearspace/ftldebugger.jspa
One thing that might be worth mentioning is that you can only access the ftldebugger if you are logged in as an administrator. Other than that, you should look in your logs to see if maybe there is a misconfiguration of your jiveHome directory, your jiveUrl or something else that might be throwing an exception.
-Jon
Jive Certified Clearspace Developer
Jon: I am logged in as admin. I re-installed the plug-in and bounced the services. But still I am getting "page not found" error. Here is the error from the log file:
*********************************************************************************************************************
27 Jan 2009 15:07:44,558 [http-8080-1] ERROR dispatcher.Dispatcher - Could not find action or result
There is no Action mapped for namespace / and action name ftldebugger. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at com.jivesoftware.community.web.struts.JiveFilterDispatcher.doFilter(JiveFilterDispatcher.java:101)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jivesoftware.community.web.filter.SetResponseCharacterEncodingFilter.doFilter(SetResponseCharacterEncodingFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jivesoftware.community.web.filter.JiveDynamicResponseHeaderFilter.doFilter(JiveDynamicResponseHeaderFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jivesoftware.community.web.filter.JiveCompressionFilter.doFilter(JiveCompressionFilter.java:103)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jivesoftware.community.web.filter.SetRequestCharacterEncodingFilter.doFilter(SetRequestCharacterEncodingFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jivesoftware.util.NoCacheFilter.doFilter(NoCacheFilter.java:66)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.directwebremoting.servlet.DwrWebContextFilter.doFilter(DwrWebContextFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jivesoftware.base.plugin.PluginFilter.doFilter(PluginFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at com.jivesoftware.community.aaa.JiveAuthenticationTranslationFilter.doFilter(JiveAuthenticationTranslationFilter.java:164)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at com.jivesoftware.community.aaa.FeedsBasicProcessingFilter.doFilter(FeedsBasicProcessingFilter.java:146)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at com.jivesoftware.community.aaa.SessionTrackingFilter.doFilter(SessionTrackingFilter.java:53)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jivesoftware.community.web.filter.ApplicationStateFilter.doFilter(ApplicationStateFilter.java:145)
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:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
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:844)
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)
Thanks for the log message.
I'm still not sure what would cause this, but I have a couple of question for you.
What version of clearspace are you running?
In your jiveHome directory do you see a cache/plugins/ftldebugger directory? If so does it have a valid looking struts.xml file in it?
Clearspace version 2.5.3
Here is what I see in struts.xml:
**************************************************
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
The system cannot locate the resource specified. Error processing resource 'http://struts.apache.org/dtds/struts-2.0.dtd'.
hmm. We are using the same version. That's good. Are you using the standalone Windows install by any chance?
Also, that xml message, what program did you view that with? Is that from Internet Explorer? If you open that file with notepad (or another pure text editor) what do you see?
Yes, I am using the standalone Windows install.
Here is the text using wordpad:
***********************************************
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="sn-actions" namespace="/" extends="community-actions">
<action name="ftldebugger"
class="com.swiftnotion.cs.debug.TemplateCacheDebugAction">
<result name="success">/plugins/ftldebugger/resources/templateCacheDebug.ftl</result>
<result name="clear-success" type="redirect">ftldebugger.jspa</result>
<result name="not-authorized">/plugins/ftldebugger/resources/templateCacheDebug.ftl</result>
</action>
</package>
</struts>
I downloaded the latest windows installer (2.5.6) and installed it on a Vista machine. I chose the advanced settings page and deployed it to a custom directory, a custom jiveHome location, set the port to 8888, the server to "localhost". Then via the special Clearspace manager that is part of the windows installer, I chose "View Site", this took me to the Clearspace setup process which I completed using mostly the defaults, but I did choose the evaluation database. After that, I restarted the Clearspace instance from the manager program. I then used the manager program to launch the Admin console and went to System > Plugins > Add Plugin. I uploaded the plugin jar from this page and then restarted the Clearspace instance from the manager tool. When the instance loaded back up, I went to http://localhost:8888/clearspace_community/ftldebugger.jspa
This is what I saw:
So, I'm not sure what is happening for you. I'm guessing that there is something off about your installation. It might be worth starting over and doing the advanced setup steps that I followed above. I did notice a number of database exceptions in my logs, but they didn't seem to be causing any problem for the ftldebugger plugin.
Also, if you are familiar with the Tomcat server I would recommend downloading the war file version of clearspace and using it with a standalone database like MYSQL. You might get a better feel for what it is like to use and manage a Clearspace install in a more common production environment that way. Sorry about the trouble though, it looks like it should be working.
What version of Java was used to compile the plugin? That might be causing my problem:
[WARNING] [talledLocalContainer] Feb 20, 2009 6:27:33 PM org.apache.catalina.core.StandardWrapperValve invoke
[WARNING] [talledLocalContainer] SEVERE: Servlet.service() for servlet jsp threw exception
[WARNING] [talledLocalContainer] java.lang.UnsupportedClassVersionError: Bad version number in .class file
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.defineClass1(Native Method)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
[WARNING] [talledLocalContainer] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[WARNING] [talledLocalContainer] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
[WARNING] [talledLocalContainer] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
[WARNING] [talledLocalContainer] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[WARNING] [talledLocalContainer] at java.security.AccessController.doPrivileged(Native Method)
[WARNING] [talledLocalContainer] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[WARNING] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Thanks for bringing that to my attention! I thought I had compiled it against java 1.5, but I used javap against one of the contained class files and it turns out that it was compiled for 1.6. That's no good. So I compiled a new version, which I have uploaded. Please let me know if this solves your problem.
Thanks,
Jon
Hi Ted and pghayal, I've upgraded the plugin for 3.0. Sorry i didn't respond sooner, for some reason I stopped getting email updates on this document. Also, I'm at JiveWorld 09 right now, if either of you is here and wants to talk about this plugin.
-Jon
This is pretty much my new favorite plugin. Awesome