Alpha Developers Network

Guest


Author Topic: 500 Internal Server Error  (Read 1047 times)

0 Members and 1 Guest are viewing this topic.

Victrix

  • Guest
500 Internal Server Error
« on: December 08, 2013, 03:59:18 PM »
Since the last 4 Application Server updates, I receive following error:

500 Internal Server Error
Script Error
Error:Script:inc_header_body.a5w line:9
?wt_message(msg_id,"header_above_msg")
Variable type mismatch: attempt to pass data of type 'C' to argument 'message_area_id ' is of type 'N'.

Before I never had this problem. Until version 1770_4221 (nov-06-2013) no problem, so I rolled back and it works again. Any suggestion where I should look for a resolution?

Steve Wood

  • Administrator
  • Expert
  • *****
  • Posts: 706
  • Karma: +11/-0
    • AlphaToGo
  • Real Name: Steve Wood
Re: 500 Internal Server Error
« Reply #1 on: December 08, 2013, 05:05:18 PM »
This recently came up due to an Alpha update for v12. I have a fix and will post instructions here later tonight.
---
Steve Wood
www.alphatogo.com

Victrix

  • Guest
Re: 500 Internal Server Error
« Reply #2 on: December 14, 2013, 08:06:13 AM »
Steve, can you already share the fix? Thanks in advance.

Steve Wood

  • Administrator
  • Expert
  • *****
  • Posts: 706
  • Karma: +11/-0
    • AlphaToGo
  • Real Name: Steve Wood
Re: 500 Internal Server Error
« Reply #3 on: December 20, 2013, 01:52:15 AM »
The fix for this is to add the line shown in red below. This is found in inc_header_body.a5w about line 8. Be sure to clear browser cached before retrying.

dim msg_id as n
msg_id = sql_lookup("::name::conn","wt_setup","tid=1","header_above_msg_id")
?wt_message(msg_id,"header_above_msg")

I am contemplating removing this "message" code from the next update. it is a seldom used feature and requires two trips to the database for every page refresh. The lines I would remove from inc_header_body.a5w are:

   <%a5
   dim msg_id as n
   msg_id = sql_lookup("::name::conn","wt_setup","tid=1","header_above_msg_id")
   ?wt_message(msg_id,"header_above_msg")
   %>

and towards the bottom:

   msg_id = sql_lookup("::name::conn","wt_setup","tid=1","header_below_msg_id")
   ?wt_message(msg_id,"header_below_msg")




---
Steve Wood
www.alphatogo.com