Skip to main content
barbrab
Known Participant
May 12, 2023
Question

Dreamweaver makes repeated error in Template file and will not properly save.

  • May 12, 2023
  • 3 replies
  • 1311 views

I have a Dreamweaver template with a code error that I have corrected repeatedly, and then saved, and every time I open it again the error is back. I have quit the program and restarted, rebooted my entire computer, recreated the site cache, and pretty much anything else I can think of. 
This is super annoying, since I have to manually correct all new pages created by that template, and then repeatedly ALL 71 PAGES by hand, each time I update the template and it reverts the pages back. 

I took a movie of the error, posted it to Youtube since I see no way to upload to the thread, but Adobe has stripped that, too. So here's a screen shot which will not show the problem happening at all and is next to useless. 

    This topic has been closed for replies.

    3 replies

    BenPleysier
    Community Expert
    Community Expert
    May 13, 2023

    This does not help you with your problem, but I think that you should re-consider your options. 

     

    Dreamweaver Templates will only work when using Dreamweaver. If Dreamweaver is laid down to rest, your ability to maintain the site(s) goes with it.

     

    There are a number of alternatives that you can consider.

     

    My preference is to use NodeJS?Express.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Nancy OShea
    Community Expert
    Community Expert
    May 13, 2023

    I second the recommendation to avoid backed-in features like DW Templates and Library Items.  There's too much dependance on the app itself to support features which may/may not exist in the future.  In lieu of DW Templates, I use Server-Side Includes.  A very simple technology that anyone can use.  Best of all, it can be transported to any code editor.

     

    PHP INCLUDES:

    1. Drop menu block into a separate include file and SaveAs menu.html,  i.e. includes/menu.html

    2. Add a code snippet to the parent document's <body> tag, exactly where you want the menu to appear.

    <?php require_once('includes/menu.html'); ?>

    3. Repeat steps 2 on other pages.

    4. Save documents as .php files.

    5. Upload PHP files and includes folder to your server.

    6. Repeat with other includes -- header, footer, forms, search bar, etc...

    That's it in a nutshell.

     

    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    May 12, 2023

    Sounds like a corrupted Template or it contains more errors than you realize.

     

     

    Nancy O'Shea— Product User & Community Expert
    barbrab
    barbrabAuthor
    Known Participant
    May 12, 2023

    Made a brand new template. Just applied it to a brand new html file. It doesn't even properly handle the menu. 

    barbrab
    barbrabAuthor
    Known Participant
    May 12, 2023

    Pulled wrong screenshots, my bad. 

    barbrab
    barbrabAuthor
    Known Participant
    May 12, 2023

    Well, I guess they didn't actually strip the vid. My apologies, they said they were. 

    Nancy OShea
    Community Expert
    Community Expert
    May 12, 2023

    Answers are in your code, not video or screenshots.

     

    Validate code in your Template.dwt file and fix all reported errors.

    HTML:  https://validator.w3.org/

    CSS:  https://jigsaw.w3.org/css-validator/

     

    File > SaveAs Template to the your local site folder's Templates folder. 

     

    Site - mySite (C:\mySite)

        - Templates

            - myTemplate.dwt

     

    Hope that helps.  If not, post back. We'll need to see the code from your Template.

     

     

     

    Nancy O'Shea— Product User & Community Expert