Frequently Asked Questions

Jul 22, 2024 - 04:57am

 [F] Frequently Asked Questions  / Operational Questions  / Macros and Templates  /

My macro isn't working. Web Crossing must be broken.

Rate This FAQ
Rating: ***** (based on 1 votes)

Created On: 17 Dec 1999 10:12 am
Last Edited: 7 Dec 2005 11:37 am

Question Printer Friendly

I created a new macro and put it in webx.tpl

Web Crossing isn't executing the macro, or suddenly I'm seeing strange, apparently unrelated effects in other areas. It must be a Web Crossing bug.


  1. Did you "Reset file cache for HTML files and webx.tpl templates." after saving your changes?
  2. DO NOT copy the entire STANDARD.TPL (or equivalent) into webx.tpl...only copy those macro(s) you intend to modify. Likewise DO NOT modify standard.tpl or webxStd-local.tpl. **Web Crossing does not use standard.tpl in any way. webxStd-local.tpl is used in some localized situations, but nevertheless always place modified macros in their own file.**.
  3. Where possible, always test new macros by themselves, with no other macros in webx.tpl.

  4. If that isn't possible, and the macro isn't executing, then put the new macro at the TOP of the webx.tpl file. If the macro now works then the problem is in another one of your other macros and is preventing WebX from reading your new one.

  5. Try calling the macro directly in your browser: http://yoursite/webx?MacroName@@
    If there is any response other than "Missing Template" then the problem is in your macro.

  6. If "Missing Template", try #3 or #4 above, then back to #5. If still "Missing Template" see below.
  7. Are templates turned on? See your sysop control panel.
  8. Make sure to save webx.tpl as a plain text file only...not RTF or DOC etc. Web Crossing can only parse plain text.
  9. Can Web Crossing read or find webx.tpl? Look in the control panel. If templates are On it should say "webx.tpl templates are currently: on" If it says "webx.tpl templates are currently: not found" then make sure:

    1. the file actually exists in the root webx directory (versions up to 4.1) or in webxTemplates (v5.0+) and is not a symbolic link/shortcut.
    2. your text editor does not have a file lock on webx.tpl. Check this by closing the text editor then resetting the cache. This is common in windows with MS-Word.
    3. If working on a windows platform, make sure you turn off the folder option to hide extensions. Chances are you are saving your template file with a .TXT or .DOC extension! IOW, rather than webx.tpl it is webx.tpl.txt
    4. permissions on the file and/or webx haven't accidently been changed.

  10. Variables (in JavaScript) and directives are case sensitive: myName is not the same as MyName, setPath is OK, setpath is not.
  11. Look for common syntax errors:

    1. Not closing off a directive with "%%", but rather "%" or "&&"
    2. Missing %% endif %% or %% endwhile %% statements.
    3. Improper use of operators: %% if A == 1%% not %% if A = 1%%. Same goes for & vs &&
    4. "Not equals" is "!=", and not "<>".
    5. Improper matching of closing ")"
    6. Broken HTML syntax. Particularly with TABLEs, missing closing tags, etc
    7. Missing %% certificate %%