I recently started at a new job, and am now responsible for a web site that was created using Dreamweaver. The code in the inherited site is a snarled tangle, so I'm refactoring it. I've finished rewriting the HTML and CSS in the template file which controls most of the site, but Dreamweaver CS4 refuses to update child pages. When I alter the template in DW and save it, I am not prompted to update template files. When I manually try to update by selecting Modify > Templates > Update Pages, picking "Files that Use" and the name of my template, it reports:
Updating D:\Dreamweaver Sites\Dev Site\ Done.
files examined: 0
files updated: 0
files which could not be updated: 0
total time: (0:00:00)
Note that I'm running Dreamweaver CS4 on Windows 7.
What I've Tried
I found an archived technote in the Adobe Knowledge Base suggesting seven possible causes for this behavior, but none of them applied to my site. I'll just go down the list.
- The Templates folder is correctly named (the T is lower-case, but I also tried it with upper-case, to no avail).
- The Templates folder is located in the root level of the site (has not accidentally been moved).
- My template file is indeed located in the Templates folder.
- My changes were made outside the editable regions in the template, not inside them.
- I didn't forget to upload the changed local files to the server — the local files were not changed at all.
- Recreating the site cache with Site > Advanced > Recreate Site Cache did not solve the problem.
- The pages which I am trying to update were not created incorrectly by saving the template file with a .html extension.
Since the dev site is running on a Linux server, I used the following commands to create a list of every file using a template, and then count the ones using the particular template I'm trying to update:
grep -r template\=\"\/templates\/ /path/to/site/* > ~/template-counts
cat ~/template-counts | grep template.dwt | wc -l
So there are 194 files using this template.
I tried opening one of those files in DW and updating it manually using Modify > Templates > Update Current Page, and it worked perfectly. So, in theory, I could manually open all 194 files and update them that way. I'd really rather not, though. It would take a lot of time which could be better spent on other things.
I tried using Modify > Templates > Open Attached Template on one of the child pages, and it gave me this error message:
Access to C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS4\Configuration\Menus\MM was denied.
That made me wonder if maybe it's a Windows 7 thing, so I fired up my predecessor's rheumatic Windows XP box, downloaded a copy of the site in Dreamweaver MX 2004, and tried updating the template. And voila! It updated all 194 pages.
Does anyone have any idea why CS4 chokes on this fairly simple task? Can I make it work? It would be really, really annoying to be forced to do my updates through an ancient copy of Dreamweaver on my predecessor's creaky old XP box instead of my sleek new dual-core Windows 7 system.
For the record, here are copies of the original and my modified templates: