Nested IF statements cause error when merge field contains trailing backslash

Hello,


I have found an issue where nested IF statements are not always processed correctly. The issue arises when the merge data contains a trailing backslash and there are quotes around the TrueText/FalseText fields that are the nested IFs.

Attached is a sample console app with two templates that demonstrates this. The “template-success.docx” has quotes around the TrueText for the two inner IFs; The “template-fails.docx” has quotes around all TrueText values.

Also, I noticed in the “results-success.docx”, there is a trailing space after the merged field that is not part of the original data. Wondering why this is there as well.

Please let me know if there is anything else you need.

Thanks.


Hi Gary,


Thanks for your inquiry. After an initial test with Aspose.Words for .NET 15.12.0, we were unable to reproduce this issue on our end (please see attached resultant documents i.e. 15.12.0-fails.docx and 15.12.0-success.docx). We would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. Hope, this helps.

Download latest version of Aspose.Words for .NET

Best regards,

I have downloaded 16.1.0.0 and it also fails at the call to UpdateFields().


I am able to make this fail with 16.1 and 15.2 in both a console app and a web app. When you tried to reproduce this, did you use the project I sent or do you create your own project after understanding the issue?

Is there anything you can suggest that is different than what is in the sample code? I guess I’m just a bit confused how this works for you.

Hi Gary,


Thanks for your inquiry.
Gary:
I have downloaded 16.1.0.0 and it also fails at the call to UpdateFields().

I am able to make this fail with 16.1 and 15.2 in both a console app and a web app. When you tried to reproduce this, did you use the project I sent or do you create your own project after understanding the issue?

Is there anything you can suggest that is different than what is in the sample code? I guess I’m just a bit confused how this works for you.

Yes, while using the latest version of Aspose.Words i.e. 16.1.0 and your console app, we managed to reproduce this exception (System.InvalidOperationException) on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-13114. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-13114) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.