#905: Config handlers definition loading sequence may cause exceptions with 
debug
mode off
----------------------+-----------------------------------------------------
 Reporter:  david     |       Owner:  dominik   
     Type:  defect    |      Status:  new       
 Priority:  high      |   Milestone:  1.0       
Component:  config    |     Version:  1.0.0beta2
 Severity:  critical  |    Keywords:            
Has_patch:  0         |  
----------------------+-----------------------------------------------------
 The problem was introduced with the #826 change, and #867 didn't really
 fix it properly.

 Here is what happens (debug off):

  1. A request comes in, config handlers are loaded, some config handlers
 are used to compile configs, all the caches are written
  1. Another request comes in, the module config handler is included
 unconditionally (compiled or not). As no configs were compiled before, the
 internal list of config handlers now '''only''' contains the module config
 handlers
  1. An attempt to compile the validation config for the Action of that
 second request is made. But the "normal" config handlers were never
 loaded!
  1. An exception occurs saying there is no suitable config handler

 What we need to do:
  1. Instead of loading config handler XMLs, just add them to a list of
 files {{{AgaviConfigCache}}} will load when a {{{checkConfig}}} call is
 first made
  1. When nothing has been loaded at all, load Agavi's own
 {{{config_handlers.xml}}} first (there can be one in the app, or one in
 Agavi's {{{src}}} dir)
  1. Once a file has been loaded, mark it as thus
  1. Prevent loading the same stuff multiple times
  1. When a {{{checkConfig()}}} call is made, look at the list of config
 handler XML files to see if any new ones need to be loaded

-- 
Ticket URL: <http://trac.agavi.org/ticket/905>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to