brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Syntax error in live preview. #10916

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by Ulver84 Friday Oct 07, 2016 at 10:49 GMT Originally opened as https://github.com/adobe/brackets/issues/12818


Hi,

I get a syntax error in a html file that is very basic/tiny. I have tried to reload Brackets without extensions and cleaned Live Preview Profile/Cache.

When I first activate live preview it works fine. As you can see in this video, it highlights where my cursor is, I can edit text and everything works fine, however as soon as I edit below the table, even pressing the space bar will produce a syntax error.

I have a video recording of the issue here https://www.youtube.com/watch?v=ZeJV9PvcyiQ

Latest version of Brackets, Chrome, Firefox and Windows 10.

core-ai-bot commented 3 years ago

Comment by ficristo Friday Oct 07, 2016 at 16:56 GMT


Could you share a minimal snippet of code to reproduce? Thank you.

core-ai-bot commented 3 years ago

Comment by Ulver84 Saturday Oct 08, 2016 at 08:05 GMT


Of course :) Link to the folder is here: https://www.dropbox.com/sh/7z0ce0yzph1vsvk/AABw3vYJUyYNEnd_21Gs-WW1a?dl=0

And a jsfiddle here https://jsfiddle.net/qgL118ye/

core-ai-bot commented 3 years ago

Comment by petetnt Saturday Oct 08, 2016 at 19:31 GMT


Off topic, but as a cat owner I love that website 😻

core-ai-bot commented 3 years ago

Comment by Ulver84 Sunday Oct 09, 2016 at 08:16 GMT


Haha thank you, cats are the best aren't they 😄

core-ai-bot commented 3 years ago

Comment by Ulver84 Tuesday Oct 11, 2016 at 11:50 GMT


Just to add, I also experience the same problem on my laptop.

core-ai-bot commented 3 years ago

Comment by rbuk Wednesday Oct 12, 2016 at 16:10 GMT


Joined GitHub just to say I'm also having this issue! It's heartbreaking, I was beginning to fall in love with Brackets!

core-ai-bot commented 3 years ago

Comment by Ulver84 Friday Oct 14, 2016 at 07:01 GMT


I tried with Brackets 1.8 today, but the problem persists. Is there anything I can do to help troubleshooting?

core-ai-bot commented 3 years ago

Comment by mmcken3 Thursday Oct 20, 2016 at 17:33 GMT


I downloaded the drop box code and reproduced the error as well. However, It is interesting because if you save and refresh the live preview it will update and tell you that there are no more syntax errors. But once you start editing again the issue persist. Trying to look into what is causing it now and try to replicate it with my own code. Let me know if there is anything else I could do to help!

This problem actually happens in more places than just below the table and I am curious if it does for others as well. For example when editing the side effects paragraph around line 47 this problem occurs as well.

core-ai-bot commented 3 years ago

Comment by haslam22 Thursday Oct 20, 2016 at 19:09 GMT


I downloaded the folder from dropbox and the issue is resolved by closing the li tags in the nav element near the top. Anyone else willing to verify?

core-ai-bot commented 3 years ago

Comment by petetnt Thursday Oct 20, 2016 at 19:24 GMT


@haslam22 oh, so this is a duplicate of #7257? It has a PR pending at #12057, which should be reviewed again and merged ASAP.

core-ai-bot commented 3 years ago

Comment by mmcken3 Thursday Oct 20, 2016 at 19:55 GMT


I can verify@haslam22 remarks, looking at all the places I saw the issue, it was the missing optional tags of either li or p.

core-ai-bot commented 3 years ago

Comment by petetnt Thursday Oct 20, 2016 at 19:58 GMT


Working on merging #12057 right now

core-ai-bot commented 3 years ago

Comment by petetnt Tuesday Oct 25, 2016 at 20:08 GMT


Fixed in #12057

core-ai-bot commented 3 years ago

Comment by Ulver84 Monday Oct 31, 2016 at 06:56 GMT


Good to hear! =) I saw that the 1.8 pre-release was updated three days ago and was wondering if this fix was included, but I still experience the syntax error, so I guess it hasn't been included yet. I'm completely new to github (and coding in general), and was wondering if there was a way to see when a fix was pushed to a beta or pre-release version? Thank you.

core-ai-bot commented 3 years ago

Comment by petetnt Monday Oct 31, 2016 at 07:09 GMT


Hi@Ulver84,

due to the branching nature of git that is indeed a bit tricky.

You can try to see if a particular PR is included by

  1. Cloning the whole repo git clone https://github.com/adobe/brackets
  2. Checking out the tagged release git checkout tags/release-1.8-prerelease
  3. Using git log --grep='pull/12057/commits' to see if the particular PR is included (will return nothing if not).

It might not work with squashed/rebased commits though, so one could just see if the changes from the PR are included in the source code.

However, the said fix should be included in the new prerelease. Which is kinda worrying as it doesn't occur for myself anymore 🤔

core-ai-bot commented 3 years ago

Comment by Ulver84 Monday Oct 31, 2016 at 07:52 GMT


I see, a bit more advanced than my current skill level 😄 Thank you still, I'll save those tips for when I become better.

I just tried to un-install Brackets and re-install the 1.8 pre-release, but I do still experience the issue.

Version is Release 1.8 build 1.8.0-17101 (release 5651f1f26) build timestamp: Wed Oct 26 2016 15:19:04 GMT+0100

I'm using the same code posted in the first post. I did notice that both the theme and extensions I installed, were still present after the re-install, so I figured that perhaps Brackets doesn't remove all files and some leftovers cause the bug, but reloading Brackets without extensions doesn't fix it. So a bug in the bug-fix? =)

A side-note, I have closed all the li and p tags, but that doesn't remove the syntax error for me, so I was wondering if I was missing something.

core-ai-bot commented 3 years ago

Comment by petetnt Monday Oct 31, 2016 at 07:56 GMT


Thanks for the information@Ulver84, I'll try and come back to this issue ASAP and see if I am able to reproduce it on 1.8 prerelease.

core-ai-bot commented 3 years ago

Comment by Ulver84 Monday Oct 31, 2016 at 07:57 GMT


Uh! I think I'm on to something. I might be a simple PEBKAC error (or error 40 as we call it here). I'll test some more! :)

core-ai-bot commented 3 years ago

Comment by Ulver84 Monday Oct 31, 2016 at 08:09 GMT


My bad, I thought it was a user-error for a second. I just noticed that it said "syntax error" immediately, when I typed the < sign and the tag was unfinished, but then it disappeared when I closed the tag. So I might have been too quickly, to jump to conclusions, but alas. I still got a syntax error when I added a tag further down on the page. I can't see the error and it is W3C validated, so I assume there are no unclosed tags and such, and I can't see anyone myself.

Video here. It works then doesn't work. Basically the same as in the first post 😄 https://www.youtube.com/watch?v=ObyOR0WIaho&feature=youtu.be

core-ai-bot commented 3 years ago

Comment by Ulver84 Monday Oct 31, 2016 at 08:36 GMT


Now I actually think that I worked it out. I noticed in the video, that I was editing in Firefox. I got some live-preview errors in Chrome at one point, while Firefox was working, so I switched. But just now I disabled experimental live-preview and switched to Chrome again, and now the syntax error is gone. I have tested a bit and I can't reproduce the error anymore, so I think that was the culprit.

core-ai-bot commented 3 years ago

Comment by petetnt Monday Oct 31, 2016 at 08:40 GMT


👍 Great that you got it figured out. Feel free to open a new issue / post in this one if the problem comes back.

core-ai-bot commented 3 years ago

Comment by Ulver84 Monday Oct 31, 2016 at 11:24 GMT


It has come back with a vengeance it seems :( It has happened twice, and after the first syntax error I decided to start from scratch and record my work. I'm doing a tutorial on CSS with html and CSS code provided by the teacher. The html copied from codepen has some white space when copied to Brackets. When I removed it the syntax error occurred. https://youtu.be/FidCGSJwN38?t=8m25s

The code can be seen here. http://codepen.io/ColleenEMc/pen/WQXddR

core-ai-bot commented 3 years ago

Comment by Ulver84 Saturday Nov 12, 2016 at 09:34 GMT


I figured the error out =) It's because the teacher wrote <100%> in the code, instead of (100%). Since there is no <100%> tag in HTML, Live Preview stopped working. A bit related: I had a </div> tag in my code that had no start tag, and again live preview stopped working, which makes sense. But if I may come with a suggestion, it would be nice if Brackets said something like "are you sure your tags are alright?" or highlighted certain tags that had a missing closing or start tag, or a foreign tag that Brackets couldn't make sense of, when it reported syntax error. Or perhaps give the user a button to click, that highlighted issues? Like when you hold ALT in Diablo 2, and any loot is highlighted with a name, sort of.