I have installed the Wysiwyg template plugin so my TinyMCE editor will have a button for choosing templates from a drop down. However, when I choose the drop down option, I don't see my templates.

Here is my setup:

The templage.js file is in the following directory:

[dlsweb@net1 files]$ pwd
/web/dlsweb/drupal/sites/brian.dupagels.lib.il.us/files
[dlsweb@net1 files]$ ls
BrianComic2.jpg  interactive_media_favicon.ico  Key.fla  template.js
Brian.JPG        interactive_media_logo.jpg     Key.swf  templates
[dlsweb@net1 files]$ 

The templates directory contain the following htm files:

[dlsweb@net1 templates]$ ls
layout1.htm  snippet1.htm

The template.js file point to these files:

// These templates will be displayed as a dropdown
 var tinyMCETemplateList = [
//  Name, URL, Description
 ["Template One", "sites/brian.dupagels.lib.il.us/files/templates/layout1.htm", "Template One"],
 ["Template Two", "sites/brian.dupagels.lib.il.us/files/templates/snippet1.htm", "Template Two"]
 ];

Within Site Configuration -> Wysiwyg templates, the path to the js file is set to sites/brian.dupagels.lib.il.us/files
and the js file is set to template.js

I have an input format with Tiny mce editor configured. When I create a page and hit the "insert template" button, a popup appears with a "Select template" drop down. When I click the drop down, no templates are within the list.

Am I missing a step?

I've gone over my steps multiple times. Any help would be appreciated.

Comments

Anonymous’s picture

Hi

I had a similar problem and it was as simple as deleting the browser cache to make it work again. That was on FireFox 3.5/Mac. Reloading the page didn't help, but deleting the cache via "Settings / Advanced" did the trick. If you build websites, I suggest you set your FireFox to delete it's cache everytime you restart it. Makes life a lot easier and a lot of html related problems are simply a matter of outdated browser cache data. :-)

Best regards,

Oliver

sopsmattw’s picture

same issue as systechguy.. on 6.16.. thoughts?

kari.kaariainen’s picture

Same here. I can see the templates dialog but the list is empty. Tried installing into subdirectory of files, directly to files, using absolute paths, relative paths, Firefox cache not being on, minding the last comma in the js array etc. to no avail. Drupal 6.17. Has anyone else had this issue and fixed it?

kari.kaariainen’s picture

This tripped me: it's sites/ALL/files. My templates were sitting happily in sites/default/files.

jenlampton’s picture

Category: task » support
Status: Active » Fixed

If the templates are not appearing in the drop-down you can check four things:

1) what directory did you define on your template settings page? (admin/settings/wysiwyg_template)
2) did you upload your templates to this same directory?
3) what's the name of your js file?
4) did you reference your template files correctly in your js file?

After you have verified all four of the above, please flush your site's cache, and clear your browser cache.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.