Bug 516

Summary: [Chameleon]HelpWidget popup displayed error when widgets definition is in application directory
Product: Chameleon Reporter: Normand Savard <nsavard@mapgears.com>
Component: WidgetAssignee: William Bronsema <wbronsema@dmsolutions.ca>
Status: RESOLVED WORKSFORME    
Severity: normal CC: chameleon-dev@lists.maptools.org
Priority: P2    
Version: 1.99   
Target Milestone: 1.99 beta 4   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments: Modified Hawaii templates and applications

Description From 2004-07-13 14:20:47
When the "HelpWidget" is set in a popup and widget definitions to show help for
are located in a different directory than Chameleon base installation, error
report is displayed.

Noticed that when widget definitions are located in Chameleon base installation,
the "HelpWidget" displays help as expected.

I modified the hawaii demo found on xcalibur as follow to execute this test:

1.  Added the following lines in the "hawaii_demo.html" (This file is in the
attached): 

     <!-- ------------------ -->
      <!-- HELP AREA BEGINS -->
      <!-- ------------------ -->

<tr>
                <td width="30"><a href="javascript:openPopupHelp()"><img
src="images/cwc_buttons/tool_legend_1.png" width="88" height="22" border="0"
alt="Help" title="Help"></a></td>
                <td><font face="Arial,Helvetica,sans-serif" size="1"
color="#666666">Help</font></td>

</tr>



2. Added the following JS function in "hawaii_demo.html" template:

openPopupHelp()
{
 
window.open('help.phtml','PopupHelp','width=500,height=400,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no');
}


3. Created a "help.phtml" file (in the attached).

4. Created a "hawaii_help_popup.html" file (in the attached).

5. Made a new widgets directory called "widgets_norm".

6. Moved the "HelpWidget" directory  into this new directory "widgets_norm".

7. Modified the "CWCExecute function to include the new widgets path:

  $oApp->CWCExecute("/path/to/hawaii_chameleon/htdocs/widgets_norm/");

8. Loaded "index.phtml".

9. Click on the "Legend" button (I used the "Legend" button image for the help.)

10.  Errors are reported.

Fedora Core 2 Chameleon 20040709.

----------------------
Error reported:

    * "ERROR: Widget Definition for class '' not found (tag is <CWC2
TYPE="HelpWidget" VISIBLE="TRUE" ENABLED="TRUE" WIDGET="Extent"/>).
    * "ERROR: Widget Definition for class '' not found (tag is <CWC2
TYPE="HelpWidget" VISIBLE="TRUE" ENABLED="TRUE" WIDGET="HelpWidget"/>).
------- Comment #1 From 2004-07-13 14:29:43 -------
Created an attachment (id=37) [details]
Modified Hawaii templates and applications
------- Comment #2 From 2004-07-15 14:41:25 -------
Changed target to 1.99 RC 1.
------- Comment #3 From 2004-11-03 14:47:25 -------
Bill, please verify this bug and fix if necessary.
------- Comment #4 From 2004-11-04 07:24:31 -------
Norm,  I can't reproduce this problem.  Is it still an issue?  If it is, please
verify that it the popup that is the problem and not just a general problem with
the HelpWidget being in another directory.

Also can you please use a more simple example to produce the problems in? (for
this bug and others too)  Using one of the Chameleon samples in CVS is the
easiest.  The Hawaii demo is too much of a pain to configue and keep up to date.
 Thanks.
------- Comment #5 From 2004-11-05 14:01:20 -------
I recognize that this bug is a way too much complicate.  I tried to reproduce it
but I have an issue with EmbeddedHelp" (see bug 815).
------- Comment #6 From 2004-12-02 08:20:12 -------
I cannot reproduce this problem at all, and considering that the Embedded help
widget was written from scratch to replace the HelpWidget, I am resolving this
bug as "worksforme".