1.62 to 2.00: Upgrading from WebHub VCL v1.62 to v2.00
Search and Replace these items in your Delphi project or your project
will not compile.
|
Old |
New |
Notes |
appMain and appMaiDB | whMain |
If you were using these units in your projects, save your copy.
As of v1.77, HREF has discontinued AppMain and AppMaiDB in
favor of the combination of whMain, dmWebHub and a datamodule with an application object.
|
logindlg | tpLogin | This unit name must be changed in Uses clauses as
of v1.740. LoginDlg was caused a conflict with RX Controls. |
ucDialog | ucDlgs | This unit name must be changed in Uses clauses as
of v1.740. If you used ucDialog in any of your own packages, you will need to rename the reference and then rebuild the packages. The ucDialog name caused a conflict with Crystal Reports. |
fmDecode | whDecode | This unit name must be changed in Uses clauses as
of v1.770. Renamed for consistency with other WebHub panels.
|
debug | tpDbg | This unit name must be changed in Uses clauses. |
debugctl | (delete) | This unit name must be deleted from Uses clauses because it is no longer shipping. |
TWebBrowser | TwhBrowserLink | Component renamed in v1.77 due to changes in Delphi 5. |
TwhResponseSimple.WebBrowser | TwhResponseSimple.BrowserLink | Property renamed in v1.77. |
TwhguiTekoMemo.WebBrowser | TwhguiTekoMemo.BrowserLink | Property renamed in v1.77. |
TWebBrowserFileProperty | TwhBrowserLinkFileProperty | Property editor renamed in v1.77. |
WebIniFileLink | |
If you get errors on opening any datamodules that say the WebIniFileLink component is gone, choose the "remove" option and then save and reopen your project.
|
Resolve these issues in your WebHub project or your application will not work properly.
|
- As of v1.77, the default for several key TwhAppBase properties are set in the shared
datamodules (ht\lib\dmWebHub.pas). This means that the property setting
might be different from what you were using in an earlier version of WebHub.
You can override the settings most easily by adding entries to the [TwhAppBase.Defaults]
section of your App's INI file using notepad. The three most important properties
to review, and their v1.62 settings, are:
[TwhAppBase.Defaults]
CgiUseHandle=true
ShareSessions=true
ShareByFile=true
- Control TheAppID from the DPR (v1.770)
Support for the /ID parameter has been removed from dmWebHub.pas.
If you want to use the /ID parameter, use this example code to control the Application ID from the DPR:
uses
webapp, ucString, uCode; // add these 3 units if you don't already have them
with pWebApp do begin
AppID:=DefaultsTo(ParamString('ID'),'dbEdit');
Refresh;
end;
Note that the INI file used by the app can (still) be controlled using the '/APPINI=' parameter
to make it independent of the AppID settings within the Hub.
Search for and Resolve these issues in your W-HTML or
your application will not work properly.
|
- Search for TxtVars whose names do not start with the TXT prefix.
As of v1.650, TwhRequest.DetectTextAreas defaults to False which makes unprefixed
TxtVars remain in StringVars. Set to True to make WebHub check all incoming StringVars for
CrLf and if found, move data to TxtVars regardless of prefix. A true setting slows performance
slightly.
- Search for DYNCHUNK and review the syntax. As
of v1.640, you have to put
percent-equals around expressions if you want them to expand.
Prior to v1.64, the percent-equals was unnecessary.
- Check all uses of // within Javascript; they should work
properly without changes.
Major news for W-HTML users (no action required, but worth
knowing about)
|
- Multiline expressions are supported so you can now
extend calls to macros and webaction components beyond a
single line.
- Blank lines and lines that are just // are
now allowed in the middle of expressions.
- The "else" portion of the syntax for GO, HIDE, IF, MATCH, and ASSIGNED macros works. The GO macro with the else phrase lets you use one graphic when a navigation link is relevant and another graphic when the target page is equal to the current page.
Changes that impact site security
|
- WebHub's processing of "badIP" requests has changed in v1.77.
A "BadIP" request is one where a request comes in from a surfer who had
been using a different IP# for an earlier request. This is generally considered to
be a security violation; however some ISPs (notably AOL) use "IP pools" and
therefore some additional checking is done to allow those requets.
In the past, processing had been done in the shared datamodules (ht\htfrm\*.pas),
where a constant PageID "'pgBadIP" was used. As of v1.77, if TwhAppBase.CheckSurferIP is
set to True, then surfer requests for an invalid page will be routed to the PageID
specified in AppSetting['BadIPPage'], that is, within application defaults
that you can see the HTML|Defaults panel. It is recommended that
you edit those defaults using Notepad, in the app's INI file.
- WebHub added security checks for "BadBrowser" in v1.77
A "BadBrowser" request is one where the user-agent (i.e. browser name) changes
from an earlier request. This is generally considered to be a security violation.
However if you are doing testing and copying a URL from one browser to another,
you can trigger this situation.
If you have TwhAppBase.CheckBrowser set to True, WebHub will bounce "BadBrowser"
surfers to a page specified in AppSetting['BadBrowserPage'].
- WebHub v1.650 added properties to let you disable built-in pages.
To disable all built-in pages (such as Index and IndexT), set TwhAppBase.EnableBuiltins to false.
To individually control the pages, use the TwhAppBase.Builtins property (explained in webhub.hlp).
Note that you can also provide custom behavior through the OnBuiltInPage Event of TwhAppBase.
- TwhLogin bug fixes in v1.685
The bugs were that the HtmlParam property had been blank on all uses, and that
the Passphrase property was non-blank even on invalid user ids.
- As of v1.77, if you use the as-service units and compile your application with utTrayFm,
the application will not terminate unless stopped with NET STOP or through the Services
panel. This prevents logged-in users from accidentally exiting the application.
Gotchas that probably only apply to a few people
|
- TwhWebActionEx bug fixed in v1.680
Fixed to no longer clear HtmlParam in the DoExecute method.
- TwhdbSource.Close event
This event did not properly close the datasource; fixed in v1.713.
- Bug fix in ucPos.pas in the posCI function v1.710
There was an error in the posCI function in the ucPos unit. This has been fixed.
There were two known problems resulting from this bug: (a) macro expansion failed
intermittently; (b) branded pages failed intermittently.
- Check uses of PageSettings. PageSettings are now (correctly) case sensitive.
- Check all uses of exporting to static files.
- Y2K: all date formatting now uses 4 digit years.
- Check all uses of controlled HTML with a SELECT statement.
- If your [TwhAppBase.Files] list includes files which contain
one page's worth of HTML, and no WebHub page declaration, you
must now use the "AsPage" modifier in your files list.
[TwhAppBase.Files]
pgWelcome=welcome.html,AsPage
pgAbout=about.html,AsPage
- If you use a plain Delphi form in a WebHub project, and you don't have a restorer component, then the editors (e.g. HTML
| Files panel) will no longer be able to remember their positions. Add one restorer/inilink combo to your main form to remedy this.
If you are using ht\htfrm\whMain.pas then no changes are required.
- If you copied and modified utMainFm.pas, and used the /NoMenu Commandline parameter (v1.77)
This used to be called from the init procedure where it could lead to GPFs under
certain conditions. It was moved to utMainFm.OnFormCreate. If you rely in this logic
in copies of utMainFM.pas, please make this change.
- If you were using the Restorer component in a
custom way, note this BugFix from v.177:
The main-form's restorer would be replaced internally and you were not able to store some settings anywhere else than tpack.ini. This has been corrected. In the process the order in which the INIT; and LOAD; procedures are called was refined and the following should be taken note of:
- In WebHub panels, e.g. forms derived from utPanFrm's TutParentForm, the INIT; procedure is called before the restorer reloads variables. If, for example, you are initializing database connections based on these settings from INIT; you will now have to write a public procedure init(Restorer:TFormRestorer); override; and move initialization logic there.
- In mainforms, e.g. forms derived from utMainFm's TtpMainForm or [trayunit/class], you can program against the inherited load/save events and the same order applies: INIT before LOAD. The upshot of this is that you can now set the restorer's UseDefaultFile option to false and have the INI
- v1.770: The "/active" and "/inactive" parameters are no longer implemented. They
have been replaced by the new "NoHub" parameter. "NoHub" should be
passed if you want your application to start with TwhConnection.usewebhub set to
False, which disconnects the application from the Hub. This
lets you update/edit W-HTML on WinNT, Win95 and Win98. It should not be necessary
under WebHub v2.00 which supports Win95 and Win98 directly.
File Uploading and Background Processing
|
- File upload works fine with the 2.0 ISAPI runner, so if you
were using cgi-win as a workaround, that is no longer necessary.
-
Major paradigm change: v1.73 added support for running
slow tasks asynchronously, in a background thread. To take
advantage of this, license the HtPlus Pack which gives you
additional source code plus an "async" demo.
Last updated
30-Nov-2006
Pacific Time
Copyright © 1995-2024
HREF Tools Corp. All Rights Reserved Worldwide.
Running: WebHub-v3.287 compiled with d29_win64 on Microsoft-IIS/10.0,
Thu, 12 Sep 2024 23:00:42 UTC
Session 1001,
0 pages sent to CCBot/2.0 (https://commoncrawl.org/faq/) at 18.207.133.13;
Time to produce this page: 0msec.