Help with debugging errors
-
MageWriter
- Propeller Head
- Posts: 32
- Joined: Sat Feb 08, 2014 11:58 am
Help with debugging errors
I'm new to Flare, using the 9.1 trial version. Larger issue aside, I have just edited the XML and am now seeing an error "Warning: Invalid syntax in or near " tag on line 59"
I cannot select the error to google it, I cannot view a log that might show more context, and Flare is giving me no help in trying to locate the error in the XML.
I need a hint to get started, such as how can I google the error? (Typing the error into google didn't do much good but it would be better if I didn't have to do that.)
What assistance does Flare provide trying to debug errors like this?
I cannot select the error to google it, I cannot view a log that might show more context, and Flare is giving me no help in trying to locate the error in the XML.
I need a hint to get started, such as how can I google the error? (Typing the error into google didn't do much good but it would be better if I didn't have to do that.)
What assistance does Flare provide trying to debug errors like this?
-
Nita Beck
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Help with debugging errors
Welcome to the forums.MageWriter wrote:...and Flare is giving me no help in trying to locate the error in the XML.
Flare is telling you exactly where the error is, or is near, in the code of the topic. Open the topic in Flare's Internal Text Editor and examine what's going on in line 59. There is something invalid in (or near) line 59. It could be that there are mismatched tags or that a tag is missing its closing ">". It could be that there's a missing or extra " within a tag.
If you can't figure it out, post line 59 here (frame it within a code tag) and we'll see what's up.
Nita

RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
MageWriter
- Propeller Head
- Posts: 32
- Joined: Sat Feb 08, 2014 11:58 am
Re: Help with debugging errors
Not really. And I'd still like to know if this is the only troubleshooting help I get with Flare.
I'll suggest as a feature addition they make the error selectable so it's easier to search.
In this case, there were compound issues and Flare's error text was no help at all. Having an error that claims there is an empty tag is kind of ludicrous but maybe that's the state of XML/XSD in this day and time.
I solved the issue by going back to my original HTML, copying the problematic part into a separate window, and reformatting it. Long story but replaced <br /> with </p>, made sure all the <p> tags were paired, and some other things that are project-specific.
After I imported just that bit of HTML, I could replace it in the original document using its the Text Editor and go on my merry way.
I'll suggest as a feature addition they make the error selectable so it's easier to search.
In this case, there were compound issues and Flare's error text was no help at all. Having an error that claims there is an empty tag is kind of ludicrous but maybe that's the state of XML/XSD in this day and time.
I solved the issue by going back to my original HTML, copying the problematic part into a separate window, and reformatting it. Long story but replaced <br /> with </p>, made sure all the <p> tags were paired, and some other things that are project-specific.
After I imported just that bit of HTML, I could replace it in the original document using its the Text Editor and go on my merry way.
Re: Help with debugging errors
If you edit topics in Flare's text editor, it will indicate any errors (on the toolbar) as you're typing, and also warn you when you save an invalid document.
If you edit topics outside Flare (which I do a lot), then it's usually a good idea to view them in Flare's XML editor, as it will warn you if there's invalid XML.
You can make feature suggestions here: https://www.madcapsoftware.com/feedback ... quest.aspx
If you edit topics outside Flare (which I do a lot), then it's usually a good idea to view them in Flare's XML editor, as it will warn you if there's invalid XML.
You can make feature suggestions here: https://www.madcapsoftware.com/feedback ... quest.aspx
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Help with debugging errors
The only improvement to the error message I could think of is including the tag that trips up Flare (and it may have attempted to do that already) or at least the position on the line that was processed and generated the error. Many Flare error messages are surely lacking clarity as they tend to be some non-descriptive blahblah coming from the .NET runtime that doesn't even tell developers anything. In this case, "Invalid syntax in or near " tag on line 59" is about as close as it might even get. I did startpage that phrase and the results are of no real help to the problem you encountered as far as I can tell.
If you ever come across this again, try the W3C validation tool available from here: http://validator.w3.org/ . You get a nice report that tells you exactly where and what is not conforming to W3C standard. One word of warning, in some cases non-standard markup is necessary to make things work for Internet Explorer, but missing tags are not in that group.
If you ever come across this again, try the W3C validation tool available from here: http://validator.w3.org/ . You get a nice report that tells you exactly where and what is not conforming to W3C standard. One word of warning, in some cases non-standard markup is necessary to make things work for Internet Explorer, but missing tags are not in that group.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
-
SteveS
- Senior Propellus Maximus
- Posts: 2090
- Joined: Tue Mar 07, 2006 5:06 pm
- Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
- Contact:
Re: Help with debugging errors
I'm not sure how you are using Flare, but as a trial version user you might not have seen all the tricks.
When you open a topic there are 2 tabs at the bottom of the page, Text Editor and XML Editor.
Most people work in the XML Editor. It's more like a WYSWIG environment (cue an old discussion from Flare v1...). It's a good place to start because it is very hard to corrupt your underling code, when you use Flare to format text and design elements it takes care of the opening and closing tags.
Sometimes, however, you need to get under the bonnet to tweaks things (if you understand HTML etc). This is where the text editor comes in. (In the bad old days we used to open the files using Notepad++ or other text editor). The text editor allows you to see ther line numbers. So, if the compiler is choking on a line you can use the text editor to view the underlying code and find the offending line...
HTH
When you open a topic there are 2 tabs at the bottom of the page, Text Editor and XML Editor.
Most people work in the XML Editor. It's more like a WYSWIG environment (cue an old discussion from Flare v1...). It's a good place to start because it is very hard to corrupt your underling code, when you use Flare to format text and design elements it takes care of the opening and closing tags.
Sometimes, however, you need to get under the bonnet to tweaks things (if you understand HTML etc). This is where the text editor comes in. (In the bad old days we used to open the files using Notepad++ or other text editor). The text editor allows you to see ther line numbers. So, if the compiler is choking on a line you can use the text editor to view the underlying code and find the offending line...
HTH
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
-
MageWriter
- Propeller Head
- Posts: 32
- Joined: Sat Feb 08, 2014 11:58 am
Re: Help with debugging errors
There's no reason Flare should display nonsense errors. I've filed a feature request, we'll see what happens.
In addition, I posted a question today about how Flare often makes a huge mess of HTML import. If I get a message like "Invalid syntax on or near line 59" and line 59 really has about 12 lines of HTML code in it there's no real way to troubleshoot or fix it in the Text Editor. This is also a feature request. Flare should respect line breaks in code it's importing.
The workaround is to fix it in Notepad++ and either copy/paste into Text Editor or import the fix as a new HTML file and integrate it into the problem file. Then I can use XML Editor but otherwise, the XML Editor is useless because if Flare believes there is a syntax error it won't display the XML Editor at all.
In addition, I posted a question today about how Flare often makes a huge mess of HTML import. If I get a message like "Invalid syntax on or near line 59" and line 59 really has about 12 lines of HTML code in it there's no real way to troubleshoot or fix it in the Text Editor. This is also a feature request. Flare should respect line breaks in code it's importing.
The workaround is to fix it in Notepad++ and either copy/paste into Text Editor or import the fix as a new HTML file and integrate it into the problem file. Then I can use XML Editor but otherwise, the XML Editor is useless because if Flare believes there is a syntax error it won't display the XML Editor at all.
-
MageWriter
- Propeller Head
- Posts: 32
- Joined: Sat Feb 08, 2014 11:58 am
Re: Help with debugging errors
Ramon, I tried the HTML validator but it works too well... I'm taking long HTML files, importing them into Flare, and "chunking" them. The HTML was authored for a CMS we use and it's apparently pretty tolerant of bad HTML.
HTML validator found about 700 errors, most of which were not really errors; e.g., using the self-closing <br /> in HTML4. There were so many picky errors that it was difficult to find the real errors so I gave up on it.
I would often get validation errors in Flare when I used Flare's Text Editor to cut out parts of the long HTML to make smaller ones. In some cases I had no idea why they were invalid after checking them out in Notepad++.
If anyone else has this same issue, I suggest:
1) In the Flare Text Editor, cut a bit of HTML you want to use for a smaller "chunked" HTML file.
2) If you get validation errors, Control+Z (undo) and make sure you selected the correct HTML code.
3) If validation errors persist, copy the HTML to a new topic and see if it is valid there.
4) If so, see if you can get the original HTML to validate by cutting more things out of it. If not you might have to leave it there.
5) If you have trouble getting HTML to validate, copy it to Notepad++ or your HTML editor of choice. Manually examine it or use the HTML validator to assist.
6) Copy the edited HTML file to a folder in your Flare project or Project > Import > HTML.
7) If the edited HTML passes validation, make it a topic, edit it some more, and move on to the next "chunk".
HTML validator found about 700 errors, most of which were not really errors; e.g., using the self-closing <br /> in HTML4. There were so many picky errors that it was difficult to find the real errors so I gave up on it.
I would often get validation errors in Flare when I used Flare's Text Editor to cut out parts of the long HTML to make smaller ones. In some cases I had no idea why they were invalid after checking them out in Notepad++.
If anyone else has this same issue, I suggest:
1) In the Flare Text Editor, cut a bit of HTML you want to use for a smaller "chunked" HTML file.
2) If you get validation errors, Control+Z (undo) and make sure you selected the correct HTML code.
3) If validation errors persist, copy the HTML to a new topic and see if it is valid there.
4) If so, see if you can get the original HTML to validate by cutting more things out of it. If not you might have to leave it there.
5) If you have trouble getting HTML to validate, copy it to Notepad++ or your HTML editor of choice. Manually examine it or use the HTML validator to assist.
6) Copy the edited HTML file to a folder in your Flare project or Project > Import > HTML.
7) If the edited HTML passes validation, make it a topic, edit it some more, and move on to the next "chunk".
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Help with debugging errors
You can set the version of HTML that the validator should check against in the "More Options" section. There is also an option to group errors by type so that you can focus only on those that matter most to you. Some of the errors reported may not make a difference in production use, but times move forward and not adopting HTML5 now will not make things better. And there are way too many who think that strict adherence to HTML standards is optional. Yes, I mean you, Microsoft!
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Help with debugging errors
When I get an invalid syntax error I wish Flare would let me return to the WYSIWYG editor so that I can how the error is screwing up the formatting of the document. That would help me troubleshoot the error. Flare could still prevent me from saving or generating the document while the error persists.
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: Help with debugging errors
What I wish Flare would do, is rather than just telling me what line the error occurred on, is to tell me what Flare EXPECTED to see and didn't.
That would be useful, because it would help me determine if the problem is XML that isn't well-formed. (In XML you can't mix up the order of tags. In older HTML you can get away with <b><i>Hello</b></i>. That isn't well-formed, because the tag order got mixed up. Well-formed XML would be <b><i>Hello</i></b>.)
Then, it would be nice if Flare also told me when the error is because the XML isn't valid. (In XML, all elements have to be declared in the schema. In HTML <topic><b>Hello</b></topic> is well-formed (see example above), but it is invalid because <topic> is not a recognized element in the HTML schema.) Especially in cases where you are editing HTML-imported documents, you may find that you have an element that is valid HTML, but for some reason isn't in the Flare XML schema (which I've never actually run into, but I suppose is theoretically possible).
Anyway, it would be super helpful if Flare would tell me not only where the error occurred, but what it didn't like about that point in time (either an unexpected element with the element that it DID expect, or a declaration that the element isn't in the schema/DTD).
That would be useful, because it would help me determine if the problem is XML that isn't well-formed. (In XML you can't mix up the order of tags. In older HTML you can get away with <b><i>Hello</b></i>. That isn't well-formed, because the tag order got mixed up. Well-formed XML would be <b><i>Hello</i></b>.)
Then, it would be nice if Flare also told me when the error is because the XML isn't valid. (In XML, all elements have to be declared in the schema. In HTML <topic><b>Hello</b></topic> is well-formed (see example above), but it is invalid because <topic> is not a recognized element in the HTML schema.) Especially in cases where you are editing HTML-imported documents, you may find that you have an element that is valid HTML, but for some reason isn't in the Flare XML schema (which I've never actually run into, but I suppose is theoretically possible).
Anyway, it would be super helpful if Flare would tell me not only where the error occurred, but what it didn't like about that point in time (either an unexpected element with the element that it DID expect, or a declaration that the element isn't in the schema/DTD).
