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

Template error: Bad syntax in a template comment...

Community Beginner ,
Mar 26, 2017 Mar 26, 2017

Copy link to clipboard

Copied

I get an error suddenly when I save template (and attempt to update other pages):

There is an error at line 12, column 15 (absolute position 622) of "my local site template file": Bad syntax in a template comment, e.g. unbalanced quotes or missing attribute value.

So I am unable to update pages based on this template. The page shows no html errors. I just can't figure it out?

http://www.theruinsgolf.com/Templates/template.dwt

Views

544
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

correct answers 1 Correct answer

Community Expert , Mar 26, 2017 Mar 26, 2017

I don't know how this happened, but your Template got really messed up.

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- TemplateBeginEditable name="metatags" -->

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="author" content="Tina Bruckner-Due North Design">

<meta name="description" content="18-Hole Adventure Miniature Golf Course located in Oconto, Wisconsin USA.">
<meta name="keywords" content="p

...

Votes

Translate
LEGEND ,
Mar 26, 2017 Mar 26, 2017

Copy link to clipboard

Copied

First make a copy of your website folder so you can fall back to it if anything goes wrong.

I dont know a lot about the dwt template syntax but the code below is not correct::

<!-- TemplateBeginEditable name=<meta name="description" content="18-Hole Adventure Miniature Golf Course located in Oconto, Wisconsin USA.">
<meta name="keywords" content="putt putt, mini golf, put put, groups, parties, chocolate shoppe ice cream, soft pretzels, birthday party, family recreation, Oconto, Green Bay, Wisconsin, ADA, wheelchair, disabled.">

It should probably be more like below: (note the addition of name="description_keywords" -->)

<!-- TemplateBeginEditable name="description_keywords" -->

<meta name="description" content="18-Hole Adventure Miniature Golf Course located in Oconto, Wisconsin USA.">
<meta name="keywords" content="putt putt, mini golf, put put, groups, parties, chocolate shoppe ice cream, soft pretzels, birthday party, family recreation, Oconto, Green Bay, Wisconsin, ADA, wheelchair, disabled.">

At the moment you have a TemplateEndEditable tag but a deformed opening one.


<!-- Title -->

<title>18-Hole Miniature Golf Course | The Ruins Mini Golf, Oconto Wisconsin</title>

<!-- TemplateEndEditable -->

Incidentally the keyword meta tag is junk, no search engine even looks at that tag these days. They look at the page content so you can safely get rid of that.

You have a correctly structured editable template area already in your page name="head" (see below) which is not being used so you could effectively move the <title><title tag and the meta description tag information into that and delete the deformed template region.

<!-- TemplateBeginEditable name="head" -->

<!-- TemplateEndEditable -->

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 Beginner ,
Mar 27, 2017 Mar 27, 2017

Copy link to clipboard

Copied

Thanks Osgood for the response... and I agree with the fixes that you recommended - but strangely the problem didn't go away. So I resorted to re-creating the template using one of my existing html pages which worked fine. Not sure what went wrong there, but I stripped that file right down and still got the error.

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 ,
Mar 26, 2017 Mar 26, 2017

Copy link to clipboard

Copied

I don't know how this happened, but your Template got really messed up.

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- TemplateBeginEditable name="metatags" -->

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="author" content="Tina Bruckner-Due North Design">

<meta name="description" content="18-Hole Adventure Miniature Golf Course located in Oconto, Wisconsin USA.">
<meta name="keywords" content="putt putt, mini golf, put put, groups, parties, chocolate shoppe ice cream, soft pretzels, birthday party, family recreation, Oconto, Green Bay, Wisconsin, ADA, wheelchair, disabled.">

<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="title">

<title>18-Hole Miniature Golf Course | The Ruins Mini Golf, Oconto Wisconsin</title>

<!-- TemplateEndEditable -->

ALL YOUR SCRIPTS AND CSS HERE. 

<!-- TemplateBeginEditable name="head" -->

<!-- TemplateEndEditable -->

</head>

<body>

YOUR PAGE CONTENT HERE...

</body>

</html>

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
Community Beginner ,
Mar 27, 2017 Mar 27, 2017

Copy link to clipboard

Copied

LATEST

Thanks Nancy... I used your suggested code with high hopes (I also tried Osgood's fixes as well) but still couldn't save the file without the error. I simply had to recreate a template from an existing html page and all is working again.

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