Ticket #888 (closed defect: duplicate)
global page properties e.g. Theme or StatePersisterClass was ignored
| Reported by: | godzilla | Owned by: | xue |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.3 |
| Component: | Prado Framework v3 | Version: | 3.1 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
i've configure page-services as follow:
<service id="page" class="TPageService" BasePath="Application.Pages" BasePageClass="Path.To.Custom.BasePage" DefaultPage="Home"> <pages MasterClass="Application.Layouts.MasterLayout" Theme="default" StatePersisterClass="System.Web.UI.TCachePageStatePersister" StatePersister.CacheModuleID="persistercache" StatePersister.CacheTimeout="600"> </pages> </service>
This causes
Fatal error: Call to a member function getBaseUrl() on a non-object in C:\Development\php\prado\framework\TComponent.php(396) : eval()'d code on line 1
StatePersisterClass? is still default "System.Web.UI.TPageStatePersister"
if setting manualy in TPage subclass it works as expected
public function onPreInit($param) {
parent::onPreInit($param);
$this -> setTheme( $this -> getApplication() -> Parameters['ThemeName'] );
$this -> setStatePersisterClass('System.Web.UI.TCachePageStatePersister');
$persister = $this -> getStatePersister();
$persister -> setCacheModuleID('persistercache');
$persister -> setCacheTimeout('600');
}
set properties manually in every page via directive-syntax it work too
<%@ MasterClass="Application.Layouts.Sub_Layout" Theme="default" StatePersisterClass="System.Web.UI.TCachePageStatePersister" StatePersister.CacheModuleID="persistercache" StatePersister.CacheTimeout="600" %>
i guess is depends somehow on page-directive
<%@ MasterClass="Application.Layouts.Sub_Layout" %>
i override "setSubProperty" in my TPage subclass and only MasterClass? was set
Environment: WinXP / Apache 2.2 / PHP 5.2.4 / Prado 3.1.2
Change History
Note: See
TracTickets for help on using
tickets.
