Topic
  • 10 replies
  • Latest Post - ‏2014-03-24T16:44:08Z by Richard_Good
Richard_Good
Richard_Good
51 Posts

Pinned topic Rhapsody REST Server really bad at processing RTF

‏2013-09-11T16:33:09Z |

The following RTF strings cause errors in the Rhapsody REST server and will therefore cause RPE to hang:

String that begin with a bold character (which seems to mean that if you flush your RTF using a richtext box (microsoft recomended way and maybe part of the way RPE processes RTF into XHTML), you maintain an opening bold tag, but no closing tag making the REST server report an error and fall over.

Strings that have control characters in them (\u0001, \u0002, \u0003) appeared in my rhapsody descriptions.

strings like like <this thing here> are reported as errors, because angle brackets aren't escaped for some reason. That string in a description box will give you an attribute thing for element this should be followed by an = sign type error

Something like this is reported as fixed in Rhapsody 8.0.4, but at least the first two issues are still present in 8.0.4, didn't try the angle bracket thing, but the issue was in Rhapsody 8.0.3

This is the element that always breaks the REST server: - <rhp:descriptionXHTML>

I have raised an error report as it was driving me slightly bonkers, but wondered if anyone else has come across this issue.

Richard

  • Haskamp
    Haskamp
    4 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2013-11-07T13:24:59Z  

    I have the same problem - as soon as some text formatting is available in Rhapsody description fields, the "descriptionXHTML" blocks are completely broken, often starting with XML end tags (which have obviously no corresponding start tag), like </b> etc.

    Update to Rhapsody 8.0.4 did not resolve the problem.

    Do you have a reference PMR number for this issue?

    I currently have no idea how to export descriptions from Rhapsody without losing the formatting:

    descriptionText = no formatting

    descriptionHtml = no formatting

    descriptionRtf = "raw" RTF, not compatible with Word

    descriptionXhtml = broken

    Is there a possibility to convert the RTF commands into something that Word understands during the publish process? E.g. a RPE script command?

    Florian

    Updated on 2013-11-07T13:28:05Z at 2013-11-07T13:28:05Z by Haskamp
  • Richard_Good
    Richard_Good
    51 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2013-11-07T13:29:35Z  
    • Haskamp
    • ‏2013-11-07T13:24:59Z

    I have the same problem - as soon as some text formatting is available in Rhapsody description fields, the "descriptionXHTML" blocks are completely broken, often starting with XML end tags (which have obviously no corresponding start tag), like </b> etc.

    Update to Rhapsody 8.0.4 did not resolve the problem.

    Do you have a reference PMR number for this issue?

    I currently have no idea how to export descriptions from Rhapsody without losing the formatting:

    descriptionText = no formatting

    descriptionHtml = no formatting

    descriptionRtf = "raw" RTF, not compatible with Word

    descriptionXhtml = broken

    Is there a possibility to convert the RTF commands into something that Word understands during the publish process? E.g. a RPE script command?

    Florian

    Yes, it is: PMR 88184,019,866

    IBM have admitted it is a problem. I wrote a tool that strips all the rtf directly out of the sbs files, that gets around the issue. I could donate this to the community if thought useful, but not sure where to put it.

  • Haskamp
    Haskamp
    4 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2013-11-07T14:31:16Z  

    Yes, it is: PMR 88184,019,866

    IBM have admitted it is a problem. I wrote a tool that strips all the rtf directly out of the sbs files, that gets around the issue. I could donate this to the community if thought useful, but not sure where to put it.

    That means you're removing all RTF formatting completely? I'd like to keep the formats...

  • Richard_Good
    Richard_Good
    51 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2013-11-07T16:01:38Z  
    • Haskamp
    • ‏2013-11-07T14:31:16Z

    That means you're removing all RTF formatting completely? I'd like to keep the formats...

    Well fixing the RTF without removing the formatting is a non trivial task. I thought I might be able to identify the problem strings and remove all the rtf from them by making sure all opening tags had matching closing tags, stripping those with uneven rtf tags and leaving those strings with the correct number of tags alone is definately possible. I left my application with a couple of unfinished methods such that I or someone else could go back in and do this at some later date, being any more subtle than that seemed too difficult to justify the time and aggravation. Anyway, its IBM's problem to fix. By the way, IBM say this is all caused by cut and paste. If that is the case why don't IBM strip out all rtf when text is pasted into a rhapsody description box and only allow it to be directly applied.

    By the way the Defect number is PI05715

    Not sure they have accepted all my moans, but they have at least accepted some of them.

  • Haskamp
    Haskamp
    4 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2013-11-08T06:32:02Z  

    Well fixing the RTF without removing the formatting is a non trivial task. I thought I might be able to identify the problem strings and remove all the rtf from them by making sure all opening tags had matching closing tags, stripping those with uneven rtf tags and leaving those strings with the correct number of tags alone is definately possible. I left my application with a couple of unfinished methods such that I or someone else could go back in and do this at some later date, being any more subtle than that seemed too difficult to justify the time and aggravation. Anyway, its IBM's problem to fix. By the way, IBM say this is all caused by cut and paste. If that is the case why don't IBM strip out all rtf when text is pasted into a rhapsody description box and only allow it to be directly applied.

    By the way the Defect number is PI05715

    Not sure they have accepted all my moans, but they have at least accepted some of them.

    It might be that we are talking about some slightly different issues here - when I switch from descriptionXHTML to just descriptionText or descriptionHTML, the output of the REST server is (at least at the moment...) correct and the RTF formatting is gone.

    I wanted to keep RTF formatting (bold fonts, bullet list etc) but that does only work using descriptionXHTML attributes (which was broken at some point). And this is definitely not due to cut+paste - I only used formatting offered by the Rhapsody GUI tools.

  • Richard_Good
    Richard_Good
    51 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2013-11-08T09:51:16Z  
    • Haskamp
    • ‏2013-11-08T06:32:02Z

    It might be that we are talking about some slightly different issues here - when I switch from descriptionXHTML to just descriptionText or descriptionHTML, the output of the REST server is (at least at the moment...) correct and the RTF formatting is gone.

    I wanted to keep RTF formatting (bold fonts, bullet list etc) but that does only work using descriptionXHTML attributes (which was broken at some point). And this is definitely not due to cut+paste - I only used formatting offered by the Rhapsody GUI tools.

    No, think its the same issue. IBM tell me the issue is to do with cut and paste, this may not be accurate. The problem is definately to do with descriptionXHTML hanging the REST server, descriptionText and descriptionHTML work fine, how the RTF got into rhapsody in the first place is immaterial to some extent. Maybe you could paste some rtf strings that break the system in here - take them from the sbs file not Rhapsody. In all cases of broken rtf I either had an uneven number of rtf tags, control characters or unescaped angle brackets.

    I use the REST server for an inhouse trace tool and cannot easily avoid it returning XHTML elements, hence blasting out the rtf sometimes just temporarily is a good solution for my problem.

  • Dragos.Cojocari
    Dragos.Cojocari
    1654 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2013-11-08T14:50:23Z  

    No, think its the same issue. IBM tell me the issue is to do with cut and paste, this may not be accurate. The problem is definately to do with descriptionXHTML hanging the REST server, descriptionText and descriptionHTML work fine, how the RTF got into rhapsody in the first place is immaterial to some extent. Maybe you could paste some rtf strings that break the system in here - take them from the sbs file not Rhapsody. In all cases of broken rtf I either had an uneven number of rtf tags, control characters or unescaped angle brackets.

    I use the REST server for an inhouse trace tool and cannot easily avoid it returning XHTML elements, hence blasting out the rtf sometimes just temporarily is a good solution for my problem.

    hey Richard,

     

    >>> The problem is definately to do with descriptionXHTML hanging the REST server,

    Does this mean that for certain rich text the request to the Rhp server takes forever ( in RPE and in the browser) or it completes but produces invalid XML which RPE rejects?

     

    Regards,

       Dragos

  • Haskamp
    Haskamp
    4 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2013-11-11T07:03:03Z  

    hey Richard,

     

    >>> The problem is definately to do with descriptionXHTML hanging the REST server,

    Does this mean that for certain rich text the request to the Rhp server takes forever ( in RPE and in the browser) or it completes but produces invalid XML which RPE rejects?

     

    Regards,

       Dragos

    For me its the latter - the REST server does not hang but generate invalid XML.

    However - our workaround now is to use descriptionRTF and create an identifier before and after the element (e.g. "#RTF#" and "$RTF$"). Afterwords we can use a VBA macro to convert the RTF syntax within Word using the clipboard functionality (cut content and paste again, Word converts RTF syntax into Word format...).

  • Richard_Good
    Richard_Good
    51 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2014-03-20T11:27:34Z  

    I am told that this REST server bug wil not be fixed in Rhapsody 8.0.6 as it is apparrently too difficult to address. I am also not being given a test fix/ build for the same reason. The rhapsody team will not rollback the XHTML functionality used to process RTF even though they admit there is a bug that breaks real functionality for what I consider to be superficial/ polish type functionality. So RPE will not work reliably with Rhapsody containing RTF until at least Rhapsody 8.0.7. RPE guys might want to take an interest.

  • Richard_Good
    Richard_Good
    51 Posts

    Re: Rhapsody REST Server really bad at processing RTF

    ‏2014-03-24T16:44:08Z  

    Bit of a conversation with myself, but having moaned in several ways, I received the following encouraging response to the Rhapsody Application server/ RTF bug I reported a long time ago, which I should in good conscience pass on: -

    "It turns out that development are working on a testfix which partially fixes this error, but also enables you to turn off the XHTML functionality with a switch in the rhapsody.ini file, as you have previously requested. This fix should be available soon, and I will notify you once you can download and use it."