Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Why am I not seeing line numbers highlighted in red for lines which have errors?

Participant ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

Saw a recent discussion here which showed errors in the html being highlighted by showing the line numbers in red.  I have two syntax errors below but no red highlighting.  I have "Enable code hints" checked.. Is there a setting/s I am missing? I am on 2017.5  I am working with a defined site and the Monaki theme. Is that green tick showing in the bottom-right corner of my screen suggesting all is ok?

thanks

Views

934
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

I think your document is not saved. Please try saving document and then you should see line numbers in red.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

Is your Linting turned on?

Go to Edit > Preferences > Linting to make sure the Enable Linting box is checked.

If it is checked, Inayal may be right...

In previous versions of DW where linting was available, it would fire on open, edit and save of the document. You would see your linting warnings in real time. The latest version of DW only fires on document save so you won't be warned about possible errors until after they're part of a saved document.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

Oops, I didn't notice that first image you posted showed PHP in the language dropdown.

Linting is only available for .html, .css and .js file extensions. If you have a .php page, it won't work there.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

https://forums.adobe.com/people/Jon+Fritz+II  wrote

Oops, I didn't notice that first image you posted showed PHP in the language dropdown.

Linting is only available for .html, .css and .js file extensions. If you have a .php page, it won't work there.

That's why its mostly rubbish, most programs have poor support for code errors because linting is not supported fully in multi-language pages. Some have a stab at it and get bits right but you cant rely on it.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

I haven't bothered with Linting since Adobe switched it to firing only on save.

If I'm being forced to save the document to see issues, I'd rather use actual validation tools that follow the specs than the Linter and its "not actually errors" error highlighting.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

https://forums.adobe.com/people/Jon+Fritz+II  wrote

I haven't bothered with Linting since Adobe switched it to firing only on save.

That would be annoying.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

thanks everyone.  I save all my files as .php so have never seen this highlighting!.  I just saved one as .html and now I see the red highlighting OK.  All my pages in my present site are saved as .php  I did this because I always use  <?php include...  statements (to bring in common code), and, unless I am wrong, the includes will not work if they appear in a normal .html page  many thanks, Dave

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2017 Jun 22, 2017

Copy link to clipboard

Copied

That is correct, unless you modify your server to parse php within .html pages, php scripts and includes won't work within a .html page.

If you're just looking for something that will list html errors in your final output page, use File > Validate > Current Document W3C, or enter your page address (or the full source code) into the form at http://validator.w3.org/nu

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 24, 2017 Jun 24, 2017

Copy link to clipboard

Copied

thanks John, yes I do use the W3C validation service.  How would I go about "modify your server to parse php within .html pages"? Can do that with my xampp?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 24, 2017 Jun 24, 2017

Copy link to clipboard

Copied

Can I parse Includes in ordinary .html files?

This varies by web host.  Some shared hosting plans allow it but many do not.  If you're on a dedicated or VPS hosting plan, it's likely that you can parse .html files as .php files by amending (or creating) an .htaccess file in your server's root folder.  If unsure, check with your hosting provider.

Contents of .htaccess file:

AddType text/html .php
AddHandler server-parsed .php
Options Indexes FollowSymLinks Includes
AddHandler server-parsed .html

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 27, 2017 Jun 27, 2017

Copy link to clipboard

Copied

Thanks Nancy.  My host is 1&1 - can I achieve what you suggest with the below options they provide; I see AddHandler is absent

thanks, Dave

htaccess_options.PNG

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 27, 2017 Jun 27, 2017

Copy link to clipboard

Copied

LATEST

You could try it but like I said above, many shared hosting plans don't allow it.  Parsing every HTML file as PHP  puts an extra load on the server.

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines