Return to Jive Software

1,232 Views 8 Replies Last post: Dec 3, 2008 10:51 AM by Vinh RSS
Sergey Zhukov Novice 32 posts since
Aug 25, 2008
Currently Being Moderated

Nov 24, 2008 5:06 AM

NNTP gateway problems

Hello!

We've upgraded Jive Forums to Clearspace with some issues, but I'll report them later.

 

Now we have some troubles with NNTP gateway:

1. Clearspace posts are doubled by NNTP gateway. When I do a post to Community, my post goes to NNTP server and back as once new message to community. Hopefully it happens only once. :-)

You can see this here:

Original post: http://jetbrains.net/devnet/message/5227292#5227292

Double: http://jetbrains.net/devnet/message/5227293#5227293

 

2. Clearspace posts HTML messages as text/plain. You can see results in links above.

I've patched NewsgroupExporter.java to fix that, but I'm sure it will be good if you do that.

 

Thanks,

Sergey

Tags: html, nntp
Vinh Jive Employee 12,056 posts since
Apr 1, 2008
Currently Being Moderated
Nov 24, 2008 5:31 PM in response to: Sergey Zhukov
Re: NNTP gateway problems

Hey Sergey,

 

You'll want to replace that line with these:

 

 

JiveContext factory = JiveApplication.getContext(); DbForumMessage m = (DbForumMessage) factory.getForumManager().getMessage(forumMessage.getID());


 

Thanks,

Vinh

Vinh Jive Employee 12,056 posts since
Apr 1, 2008
Currently Being Moderated
Nov 25, 2008 5:00 PM in response to: Sergey Zhukov
Re: NNTP gateway problems

It should be possible to mirror the functionality of the email gateway exporter, which converts the content to wiki syntax before sending out the message. You'll need to change these lines in NewsgroupExporter.AddContent:

 

 

org.w3c.dom.Document domBody = forumMessage.getBody();

StringBuffer body = new StringBuffer(JAXPUtils.toXmlString(domBody));



 

To:

 

 

String html = WikiContentHelper.contentBodyToWikiText(forumMessage.getBody());

StringBuffer body = new StringBuffer(html);



 

You'll also need to import this into NewsgroupExporter:

 

import com.jivesoftware.base.wiki.WikiContentHelper;

 

Thanks,

Vinh

Vinh Jive Employee 12,056 posts since
Apr 1, 2008
Currently Being Moderated
Dec 2, 2008 11:59 AM in response to: Sergey Zhukov
Re: NNTP gateway problems

I don't think there's a way to turn this off, since it's a part of the wiki syntax. You'd have to take a closer look at how it's being generated in the MessageFontVisitor class (in the HTMLMessageConverter.java file) and visitChildContent().

Vinh Jive Employee 12,056 posts since
Apr 1, 2008
Currently Being Moderated
Dec 3, 2008 10:51 AM in response to: Sergey Zhukov
Re: NNTP gateway problems

Noted, thanks for the catch.

 

I've created two JIRA issues for this (CS-10051 and CS-10052) with a set fix date of 2.5.6. I'll make sure to roll your changes into the fixes.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Case Product Issues

Loading Jira issues

Loading related product issues for this case
To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.