Hey guys,
I've got a problem where a plugin that worked in 1.7 doesn't in 1.9. I've tracked the problem down to the plugin XML (I think). The following XML creates the tab correctly but builds a url of the form /clearspacex/communityexample and not /clearspace/community/communityName?view=example as it should. The plugin XML for the tab is:
<tab id="community-tab" name="Example Community Tab"
description="Example of a new community tab." cssClass="jive-link-community">
<url>example</url>
</tab>
Has something changed between versions with the way plugins are inserted into the community tab structure?
Thanks!
Jay
hi Jay,
I think the XML should look something like this:
<components>
<component id="community-tabs">
<tab id="example" name="Example Community Tab"
description="Example of a new community tab." cssClass="jive-link-community">
<url>example</url>
</tab>
</component>
<components>
Let me know if that works.
Cheers,
AJ
Hey AJ,
Yeah, that's basically what I've got. I didn't include the enclosing components/component XML for brevity. I'm guessing it works for you on 1.9? If you've got a sample plugin.xml that works in 1.9 I'd love to see it...
Thanks,
Jay
hi Jay,
The example plugin should have a working plugin.xml, let me know if that helps (or not).
Cheers,
AJ
Hey AJ,
Yeah, I've checked the example plugin and it's the same. Escaping with cdata doesn't work either unfortunately, it's still building the url the tab links to without the view= part.
Thanks,
Jay
hi Jay,
Sorry for the run-around: yes it looks like the way that links are rendered in community tabs are different in 1.9. You can see the logic for the rendering in /template/global/include/community-header.ftl. In short, it looks like we used to automatically add the name of the tab to the current URL along with a 'view=' prefix. Now we require the full URL to your action. I'm looking at the source code for 1.10 right now and the code inside the CDATA section of the example plugin plugin.xml looks like this for the community tabs part:
<@ww.url value="/example-community.jspa?communityID=${community.ID?c}" />
Does that work for you?
Cheers,
AJ
Hey AJ,
Unfortunately I'm having the same problems regardless of how I code the URL. I decided to step back and try the CS 1.10 example plugin included in the CS 1.10 developer kit, which I built from source. I've attached it. I get the same behavior with it in a CSX 1.10 install. So, it appears that it's something in CS. Can you take a look at the attached example plugin?
Thanks!
Jay
hey Jay,
k, I've got the example plugin that you posted installed on 1.10. I bring up 1.10 and I see the example community tab show up in the community. It points to the appropriate place, on my machine it points to:
http://localhost:8080/clearspace/example-community.jspa?communityID=2000
When I click on that link, I'm taken to a page that shows an error:
# Status Code: 500
# Exception Type:
# Error Message: Unexpected end of file reached.
# Request URI: /clearspace/example-community.jspa
Is that what you see as well?
If I look at the file example-community.ftl, there's freemarker tag that looks a little wonky:
</
@ww.action>
That might be the problem.
Cheers,
AJ
Hey AJ,
Thanks for looking at it. That is the error I see. I stripped the
<span class="jive-thread-reply-body-container">
</ @ww.action>
from the example community ftl but still get the same error. This is though a different error than what I see in my ftl - in mine it throws an error with the syntax used for getting a jive property (the syntax is correct). It seems like any ftl isn't working when plugged into the community page from a tab?
Thanks,
Jay
Hey all,
Sorry everyone for my late update. I spoke with AJ privately and my problem with the example plugin was simple - I just needed to strip the line break that was in the ending action tag, not the whole tag. I didn't even see the starting action tag, this stuff makes me blind I guess. Anyway once I got the example plugin working on 1.10 it was pretty easy to see what I needed to change in my plugin to get it working on 1.8+ - bunch of stuff here and there.
I do have one more bug where the other tab rendering throws an error for my plugin but not the example one. There is a fix but I'd rather figure out why the example plugin works and not mine. In any case I'm tabling that and working on making the plugin work under CS 2.
Thanks AJ!
Jay