Ticket #102 (closed defect: invalid)

Opened 3 years ago

Last modified 3 years ago

Defining an page state persister class throws an fatal PHP error

Reported by: Jaco <jaco@…> Owned by: xue
Priority: urgent Milestone:
Component: Prado Framework v3 Version: 3.0
Severity: major Keywords:
Cc:

Description

configuring an state persister with:

<module id="state" class="System.Web.UI.TPageStatePersister" /

in the service page tag triggers the following error:

Fatal error: Argument 2 passed to TApplication::setModule() must implement interface IModule, called in /var/www/html/dev/framework/Web/Services/TPageService.php on line 191 and defined in /var/www/html/dev/framework/TApplication.php on line 524

I want to reimplement the current page state persister using sessions but i cant even force the configuration to use the default hidden form field state persister. Do i have to implement IModule or is there something wrong in the application configuration code?

Change History

Changed 3 years ago by xue

  • status changed from new to closed
  • resolution set to invalid

Class specified in <module> must implement IModule interface.

For TPageStatePersister, it is not a module, but a regular component. A page uses its StatePersisterClass? to determine which persister class to use. By default, it is TPageStatePersister.

Therefore, to write your own state persister, you can implement it just like a regular component/class. To use it, simply configure the StatePersisterClass? property of the pages that you want your own version to work.

BTW, please do not use this ticket system for initiating a discussion or reporting a problem that you are not sure about. Please use our forum at xisc.com for discussion. Thanks.

Changed 3 years ago by Jaco <jaco@…>

In that case, the quickstart tutorial needs an update:

http://www.pradosoft.com/demos/quickstart/index.php?page=Advanced.Performance section "Reducing Page Size".

Changed 3 years ago by xue

Thanks. Will do.

Note: See TracTickets for help on using tickets.