Bug 518

Summary: [Chameleon-HelpWidget]PHP warnings when a widget definition is located in the application directory
Product: Chameleon Reporter: Normand Savard <nsavard@mapgears.com>
Component: WidgetAssignee: chameleon-dev <chameleon-dev@lists.maptools.org>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P2    
Version: 1.99   
Target Milestone: 1.99 beta 4   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments: Template and application file.

Description From 2004-07-13 14:41:54
When a widget definition (or more)is not located in Chameleon base installation
and other widget definitions are located in Chameleon base installation, some
PHP warnings are displayed.

See attached.
---------------------
Information on the test settings:

I used the Hawaii application found on xcalibur and made a few modifications to it.

Modifications I made are:

1.  Created a new widgets directory called "widgetes_norm" in the "hawaii"
application.

2.  Moved "HelpWidget" directory from the Chameleon base installation to
"hawaii" application under this new widgets directory.

3.  Added path to this new "widgets" directory in "index.phtml" file:
$oApp->CWCExecute("/path/to/hawaii/htdocs/widgets_norm/");

4.  Added the following lines in the "hawaii_demo.html" template:

      <!-- ------------------ -->
      <!-- HELP AREA BEGINS -->
      <!-- ------------------ -->
<tr>
        <td valign="top">
          <CWC2 TYPE="HelpWidget" VISIBLE="TRUE" ENABLED="TRUE"
WIDGET="HelpWidget"/>
        </td>
        <td valign="top">
          <CWC2 TYPE="HelpWidget" VISIBLE="TRUE" ENABLED="TRUE" WIDGET="Extent"/>
        </td>

</tr>

5.  Load the "index.phtml".



-------------------------
PHP warnings:

[13-Jul-2004 14:35:13] PHP Warning: 
main(/home/nsavard/demos/hawaii_chameleon/htdocs/widgets_norm/HelpWidget/../Widget.php):
failed to open stream: No such file or directory in
/home/nsavard/demos/hawaii_chameleon/htdocs/widgets_norm/HelpWidget/HelpWidget.widget.php
on line 29
[13-Jul-2004 14:35:13] PHP Warning:  main(): Failed opening
'/home/nsavard/demos/hawaii_chameleon/htdocs/widgets_norm/HelpWidget/../Widget.php'
for inclusion (include_path='.:/usr/local/php436//lib/php') in
/home/nsavard/demos/hawaii_chameleon/htdocs/widgets_norm/HelpWidget/HelpWidget.widget.php
on line 29
------- Comment #1 From 2004-07-13 14:44:05 -------
Created an attachment (id=38) [details]
Template and application file.
------- Comment #2 From 2004-07-15 14:43:49 -------
Changed target to 1.99 RC 1.
------- Comment #3 From 2004-11-03 14:55:24 -------
This is invalid, when you move a widget in this manner, you also need to update
the include paths.  The normal way to do this in a location-independent manner
is to:

include_once( CHAMELEON_PATH."/widgets/Widget.php" );