Skip navigation
3016 Views 6 Replies Latest reply: Feb 9, 2010 6:18 AM by mikeycmccarthy RSS
Jim Carroll Bronze 21 posts since
Jun 17, 2008
Currently Being Moderated

Sep 18, 2008 1:43 PM

Trouble with xhtml extension...

How do I use the xhtml extension?

 

I think it's broken.

 

So far, I make sure I register the extension on init:

              XHTMLExtension.enable();

 

Then when I send a message, I set both the message body and htmlBody

 

I see in the debug output that the right information is there:

 

<message id="m_55" to="jcarroll@domain.com" type="chat"><body>I think not!
</body><html xmlns="http://www.w3.org/1999/xhtml"><font family="HappyCustomer" color="#3333" size="12">I think not!
</font></html><x xmlns="jabber:x:event"><composing /></x></message>

 

But in my incoming message, I see the XHTML extension, but the body is always empty!

 

What would make it interpret the contents, but never in a way that's other than empty?

 

Thanks,

-jim

    • Matt Towers Bronze 55 posts since
      Jan 14, 2009
      Currently Being Moderated
      Jan 18, 2010 8:51 AM (in response to Jim Carroll)
      Re: Trouble with xhtml extension...

      As best I can tell, that fix doesn't solve the problem.  Message.as simply never deals with an <html> node at serialize or deserialize time.  Though the problem could easily lie between the keyboard and the chair.

      • mikeycmccarthy Silver 147 posts since
        Jan 7, 2009
        Currently Being Moderated
        Jan 18, 2010 9:00 AM (in response to Matt Towers)
        Re: Trouble with xhtml extension...

        Attached our version of XHTMLExtension.as, and it's working for us. We're using the latest XIFF beta3, modified with a couple of the patches applied that we really needed and couldn't wait.

         

        Dont't forget to do a:

         

        XHTMLExtension.enable();

         

        once you've received your LoginEvent...

        Attachments:
        • Juga Paazmaya Silver 202 posts since
          Oct 23, 2007
          Currently Being Moderated
          Jan 19, 2010 12:07 AM (in response to mikeycmccarthy)
          Re: Trouble with xhtml extension...

          Added the simple line to the "deserialize" method (rev 11549).

          This extension would need a lot more investigation, as in fact all the others.

           

          If you can spare time, please move the development to the XML migration branch:
          https://svn.igniterealtime.org/svn/repos/xiff/branches/xml-migration/

          • mikeycmccarthy Silver 147 posts since
            Jan 7, 2009
            Currently Being Moderated
            Feb 8, 2010 4:00 AM (in response to Juga Paazmaya)
            Re: Trouble with xhtml extension...

            Found a bug I think relates to this - will raise in JIRA as soon as it'll let me in. XHTML extensions are all working good, we can send chat messages with colour tags now.

             

            When we mute players however, XIFF isn't happy when Openfire comes back with an error message. It only happens if the user has XHTML in the message they sent.

             

            I'm going to switch our XIFF version to use trunk or the one you recommend. At the moment we're using the beta 1 version.

             

            Let me know if anyone is having similar issues.

            • mikeycmccarthy Silver 147 posts since
              Jan 7, 2009
              Currently Being Moderated
              Feb 9, 2010 6:18 AM (in response to mikeycmccarthy)
              Re: Trouble with xhtml extension...

              I think the problem is almost definitely due to deserialization inside XMPPStanza. Even though we're using 3.0.1 beta I've checked and the relevant code is identical to what is on trunk.

               

              When it receives a forbidden error back from the server the XML has three children, of which the third is the one with nName 'error'. When the for loop starts around the children there are three children. However, after the second child has been processed and it goes back to the start of the loop, the third child has been lost!

               

              It seems likely it is something to do with the code inside the else to do with the ExtensionClassRegistry.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points