You need to log in before you can comment on or make changes to this bug.
When executing a Chameleon application, it is possible to include additional directories that can be searched for widget definitions. The intention is to allow client or application-specific widgets to be deployed that are not part of the main Chameleon distribution. If the same widget resides in both Chameleon and in the application-defined directory, Chameleon currently will find its own widget first and never use the application-specific one. In practice this situation shouldn't come up, but theoretically it is possible that a client application could redefine the behaviour of a widget in this way (for instance, provide a modified query widget that formats output differently). so this should be changed.
fixed in cvs
should this bug be verified under beta 2, and second what is the best way to verify this issue.
I made a simple test with "sample_enhanced.phtml" application. I moved the "ProjectionSelector" widget directory under "sample/htdocs" directory. The widget definition was not found. Paul, could you provide us with documentation on how it is supposed to work?
In order to make an application use widgets from an application specific location, you need to register the location with the chameleon framework. The method of doing this is to pass an array of directories to be searched to the CWCExecute function. In the samples, you would change this line: $oApp->CWCExecute(); to $oApp->CWCExecute( "/ms4w/apps/chameleon/samples/htdocs" ); and you would move the ProjectionSelector directory from the chameleon/htdocs/widgets directory to the chameleon/samples/htdocs directory. But the real issue resolved by this bug was that if the same widget existed in both chameleon and the applications' widget path, the one from chameleon would be used instead of the application one. So to test this correctly, you should make a COPY of the ProjectionSelector (or some other widget) and modify in some way that you can then tell which widget is being used.
Created an attachment (id=42) [details] modified_hawaii4.zip-modified template and application
Created an attachment (id=43) [details] modified_widget.zip-HelpWidget modified
Two copies of the same widgets in different locations generates a PHP error. Test settings used with hawai demo found on xcalibur (see comment #4): 1. Create a widgets directory under "/path/to/hawaii_chameleon/htdocs". 2. Copy the "HelpWidget" directory under this new widget directory. 3. Modified the "HelpWidget.widget.php" file (e.g.: I modified an output line like this: 'echo "<dl><dt class=\"WidgetSectionHeading\">DescriptionNorm:</dt>\n";'. 4. Modified the "index.phtml" file to specify the new widgets directory. 5. Load the application. 6. PHP error (see below). I attached required files. Fedora Core 2 Mozilla 1.6 Chameleon 20040709 ------------- PHP error: [14-Jul-2004 12:02:41] PHP Fatal error: Cannot redeclare class uimanager in /home/nsavard/proj/chameleon_beta/htdocs/UIManager.php on line 41
Changed target to 1.99 Beta 3.
tested in the following way: 1. copy sample_ogc.html to sample_customwidget.html 2. copy sample_ogc.phtml to sample_customwidget.phtml 3. edit sample_customwidget.phtml: * change $szTemplate to sample_customwidget.html * change $oApp->CWCExecute() to $oApp->CWCExecute( array( $gszAppPath."/widgets" ) ); 4. create directory chameleon/samples/htdocs/widgets 5. copy chameleon/htdocs/widgets/MapTitle to chameleon/samples/htdocs/widgets 6. Edit chameleon/samples/htdocs/widgets/MapTitle/MapTitle.widget.php: * change line 87 to read $szMapTitle = "My TITLE"; 7. open app at http://localhost/chameleon/samples/sample_customwidget.phtml. You will get an error saying that MapTitle cannot open Widget.php ... you can ignore this The Title at the top of the page will be My TITLE instead of the name from the map file. Confirm: Remove chameleon/samples/htdocs/widgets and reload, should get DEMO.
verified on windows ie. 6, using pauls steps in last comment
Verified on Fedora Core 2.