Hi. I’m suddenly getting syntax error notifications in an orange bar across my code screen. I don’t seem to be able to get rid of it. When I run the HTML check there are no problems reported. If I close the entire program, it disappears, but then when I start again and make some modifications it returns. Doing a “control z” in windows undos the changes but the banner doesn’t disappear. Not sure what to do. Should I “apply changes” despite the warnings? Right now it’s making it impossible to do much work. Any suggestions are appreciated.
I would like to find a way of switching this off. The “Syntax error” appears as soon as we try to do anything at all with the code. My solution is to shut down Pinegrow, use a text editor (BBEdit) to change code, then open Pinegrow and use the excellent Page → “Check for HTML errors” to make sure there is no problem. If it is not possible to disable the error alert, my Enhancement Request would be for access from within Pinegrow to the external editor. (This used to be possible in some programs I have used in the past, e.g. by selecting the page editor as a browser.)
I finally seemed to have found a temporary solution. I went outside of PG, opened the html page file in Notepad++ (win environment), then dumped everything into the https://validator.w3.org/ checker. Then, i carefully went through all the ignorable notices and warnings and, using Notepad++, fixed the critical errors. Then I stored the file, reopened it in PineGrow, ran the HTML checker with no problem, and after making a few more modifications to the file found that the orange banner did not appear. Once, when I made a mistake on a new line of code, it did reappear, but undoing the line of code using (control-Z) made it go away–which hadn’t been possible before.
@Fred, @JohnW the syntax error notice can be a nuisance, but there is a good reason for it.
In order to support visual editing features PG works with an internal DOM model, not on the textual representation of the code, as is the case with code editors.
Ignoring the syntax errors would cause PG to build an incorrect internal DOM model. Performing editing operation on top of that would further amplify the mistakes. When saved, DOM model is serialized into a code, that would in this case be incorrect, possibly leading to the corruption and data loss of the original document.
That’s why PG makes syntax errors (when detected) hard to ignore.
Many thanks for the explanation, Matjaz. That is a good reason for making sure Pinegrow is shut down before doing anything to the code, and checking for errors on re-opening.
Thanks much for the explanation, Matjaz. I can certainly see the danger of ignoring syntax errors. Definitely don’t want to do that! What I have noticed is that sometimes that syntax error banner is displayed and it’s very difficult to get rid of it. Oddly, the HTML syntax error check for open pages, however, will show no errors. If I run the same page through the W3 syntax check on the web and carefully parse all the notifications and concentrate on the critical errors, I can often resolve this problem. Since I am trying to use PG to upgrade a much older site, it’s possible when I copy in older code I am overloading the built-in HTML error check, and therefore just get the orange syntax banner warning that doesn’t want to go away even if the built-in HTML error check says there are no problems?
Thanks much in advance for any advice. --Fred