When attempting to add a new page (test2.asp) w/ the default template, the following error is thrown:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "default.tpl"]'
/txsg_pub3/acms_pageaction.asp, line 82
Page:
POST 112 bytes to /txsg_pub3/acms_pageaction.asp
POST Data:
id=-1&action=add&title=Test2&keyword=test2&filename=test2.asp&template=default.tpl&headtags=&parent=0&submit=Add
Cause: On line 82 in acms_pageaction.asp, the following line:
ElseIf var_template = 0 AND str_filename = "" AND str_url = "" Then
is assuming that var_template is a numeric. However, it may also be a string value.
Remedy: Change the following snippet:
ElseIf var_template = 0 AND str_filename = "" AND str_url = "" Then
SetError GetLanguage("lang_templaterequired"), GetReferPage
End If
to:
ElseIf IsNumeric(var_template) Then
If var_template = 0 AND str_filename = "" AND str_url = "" Then
SetError GetLanguage("lang_templaterequired"), GetReferPage
End If
End If