Cannot perform the quick fix

Johann
Posts: 116
Joined: Wed Jun 17, 2015 12:46 pm

Cannot perform the quick fix

Post by Johann » Thu Jul 15, 2021 11:28 am

Hello,

Some quick fixes do not work. In the "Validation" widget, a validation error appears: "The "aaa" attribute with the value "" must have a value from the "xxx yyy zzz" list.
When I click on the quick fix: Replace value "" with "xxx" in attribute "aaa", the popup error appears:

Cannot perform the quick fix: Cannot map line and column in Author page: 9:515

Johann

tavy
Posts: 291
Joined: Thu Jul 01, 2004 12:29 pm

Re: Cannot perform the quick fix

Post by tavy » Thu Jul 15, 2021 2:21 pm

Hello Johann,

Thanks for reporting this issue.
Unfortunately I cannot reproduce the error. Maybe you can give me more details. What version of Oxygen do you use? The quick fix is provided by a Schematron validation, or is from the XSD, DTD, RNG validation?
It will be great if you can send me some sample files to reproduce the problem, and XML document and a schema. You can add the sample files here, or you can send them to our support email address support@oxygenxml.com.

Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com

Johann
Posts: 116
Joined: Wed Jun 17, 2015 12:46 pm

Re: Cannot perform the quick fix

Post by Johann » Thu Jul 15, 2021 5:10 pm

Hello,

I am using 23.1.0.0 version.

The quick fix is provided by a DTD validation.

Here is an example.

document.xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE description PUBLIC "MY-DESCRIPTION"
        "description.dtd">
<description mode=""/>
description.dtd:

Code: Select all

	<!ENTITY % graphmode.AttGrp "
        mode (inline|thumbnail|text) #REQUIRED">

<!ELEMENT description EMPTY>
<!ATTLIST description
	%graphmode.AttGrp;
>
Johann

mihaela
Posts: 267
Joined: Wed May 20, 2009 2:40 pm

Re: Cannot perform the quick fix

Post by mihaela » Fri Jul 16, 2021 12:07 pm

Hi,

We managed to reproduce this problem in Web Author if we first modify the document and then quickly apply the quick fix. The error appears if the validation is not retriggered until the quick fix is applied and the node position in the document has changed (due to the first modification).
We added an issue in our internal issue tracker to fix this problem and we will update this thread when it will be available.

Can you tell us please if this is also your case? Do you remove some node or make other change in the document before applying the quick fix? Or do you have some customization that changes the document after loading?

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com

Johann
Posts: 116
Joined: Wed Jun 17, 2015 12:46 pm

Re: Cannot perform the quick fix

Post by Johann » Fri Jul 16, 2021 4:36 pm

Hello,

If I open the document:

Code: Select all

<description mode=""/>
The quick fix that adds an attribute value works.

If I open the document:

Code: Select all

<description />
The first quick fix that adds the required "mode" attribute works but the second one that adds the attribute value does not work.

It seems that if the attribute is generated, the quick fix that adds an attribute value does not work.

Johann

mihaela
Posts: 267
Joined: Wed May 20, 2009 2:40 pm

Re: Cannot perform the quick fix

Post by mihaela » Mon Jul 19, 2021 8:13 am

Hello,

To better understand your use case, can you please tell us if the second quick fix appears after you apply the one that adds the required "mode" attribute? Or both quick fixes are presented together in the Validation view and you apply them one after another?

We want to be sure that this is the same problem that we managed to reproduce.
If you want, you can send us a short video (you can send it on our email address: support@oxygenxml.com) with the steps you perform.

Best Regards,
Mihaela.
Mihaela Calotescu
http://www.oxygenxml.com

mihaela
Posts: 267
Joined: Wed May 20, 2009 2:40 pm

Re: Cannot perform the quick fix

Post by mihaela » Thu Jul 22, 2021 1:22 pm

Hello,

We managed to reproduce the problem, by using one of the options set in your option.xml file:

Code: Select all

        <entry>
            <String>author.format.compatibility</String>
            <Integer>1</Integer>
        </entry>
This means that, when the document is modified, breaking lines is avoided after element start or end tags and indenting will not be used.
So, it seems that the problem is that this option is not taken into account also when calculating the position were the quick fix is applied.
We added an issue in our internal issue tracker and we will update this thread when the fix will be available.

Thank you again for your help!

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com

Johann
Posts: 116
Joined: Wed Jun 17, 2015 12:46 pm

Re: Cannot perform the quick fix

Post by Johann » Thu Jul 22, 2021 3:36 pm

Hello,

Glad to know that the problem has been identified!

Regards,

Johann

Post Reply