I have some web pages that have been working for years in A5v7 through A5v10 WAS. But they won't work in v11 and I can't see an easy way to fix it.
Problem was originally noticed because of a login issue with a variable called Session.DataPath that - surprise, surprise - stores the path to the data folder. I set this variable in the index page. In v11, when I go to the Login page, that variable is still valid. However, when the user clicks the Submit button the Login page is re-read (to decide whether or not the user successfully logged in before redirecting to the appropriate page) and at that point the Session.DataPath variable is no longer valid - thus triggering a response.redirect() to the restart page.
Testing reveals that all session variables set in the index page disappear when I click the Submit button but all session variables created on the current page remain valid. WTF??
Remember - this worked perfectly for years in the earlier versions.
I've attached a slightly modified version of the web page. (Modified to protect the owner of the site only.)
WARNING: This is not your typical A5 web page. There are no web components and no "publishing" info. This is a hard coded web page that can just be copied to the website and it will work - assuming you have the tables and the variables from the Index page, of course.
I'm hoping I can find a simple solution. Otherwise I will have to completely rewrite every web page on this site using some other method than Session variables because most pages call themselves for validation before moving to the next page.
By the way, anyone who uses the A5_default_path variable in the WAS will have to modify their pages. In all earlier versions this returned the path to the current page and included a backslash on the end. In v11 the backslash was removed. (Again, WTF? I assume there was some kind of reason for this but I really appreciate the idea that I will now have to check this on every website I've created when it gets updated to v11. Especially if we weren't told about it.)
LATER:
Sorry about the attachment. I realized I hadn't uploaded it right after pressing the "Post" button. But then I got a "Website being updated" message and couldn't edit the message. Then my wife called me for dinner and that trumps everything else.
I haven't looked at the linked info yet but I'll post the attachment anyway in case anyone wants to look at it. And I'll let you know what I figure out once I've studied the additional info.
Problem was originally noticed because of a login issue with a variable called Session.DataPath that - surprise, surprise - stores the path to the data folder. I set this variable in the index page. In v11, when I go to the Login page, that variable is still valid. However, when the user clicks the Submit button the Login page is re-read (to decide whether or not the user successfully logged in before redirecting to the appropriate page) and at that point the Session.DataPath variable is no longer valid - thus triggering a response.redirect() to the restart page.
Testing reveals that all session variables set in the index page disappear when I click the Submit button but all session variables created on the current page remain valid. WTF??
Remember - this worked perfectly for years in the earlier versions.
I've attached a slightly modified version of the web page. (Modified to protect the owner of the site only.)
WARNING: This is not your typical A5 web page. There are no web components and no "publishing" info. This is a hard coded web page that can just be copied to the website and it will work - assuming you have the tables and the variables from the Index page, of course.
I'm hoping I can find a simple solution. Otherwise I will have to completely rewrite every web page on this site using some other method than Session variables because most pages call themselves for validation before moving to the next page.
By the way, anyone who uses the A5_default_path variable in the WAS will have to modify their pages. In all earlier versions this returned the path to the current page and included a backslash on the end. In v11 the backslash was removed. (Again, WTF? I assume there was some kind of reason for this but I really appreciate the idea that I will now have to check this on every website I've created when it gets updated to v11. Especially if we weren't told about it.)
LATER:
Sorry about the attachment. I realized I hadn't uploaded it right after pressing the "Post" button. But then I got a "Website being updated" message and couldn't edit the message. Then my wife called me for dinner and that trumps everything else.
I haven't looked at the linked info yet but I'll post the attachment anyway in case anyone wants to look at it. And I'll let you know what I figure out once I've studied the additional info.
Comment