Bug #40824

Modified action controller methods not detected properly

Added by Francois Suter almost 3 years ago. Updated almost 3 years ago.

Status:Needs Feedback Start date:2012-09-11
Priority:Should have Due date:
Assigned To:Andreas Förthner % Done:

0%

Category:-
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:FLOW3 1.1.0

Description

I had the issue when changing an action method's signature in a controller, the security framework threw an access forbidden exception. Flushing the cache solved the problem

According to Christian Müller, such a change should be detected automatically. Flushing the cache should not be necessary.

History

#1 Updated by Karsten Dambekalns almost 3 years ago

  • Status changed from New to Needs Feedback
  • Assigned To set to Karsten Dambekalns

Could you check the System_Development.log and check if the change is detected? If it is not, file monitoring seems to be wrong, if it is, reflection is probably affected.

#2 Updated by Francois Suter almost 3 years ago

I don't see any message about detecting the change. Looking for the affected action's name, I found only messages such as "A cached Route with the cache identifier "..." matched the path..." and "Route "FLOW3 :: default with action and format" matched the path... ".

Does that help? If not, what should I be looking for?

#3 Updated by Francois Suter almost 3 years ago

Checked some more, this is probably what you are looking for:

File Monitor "FLOW3_ClassFiles" detected 2 changed files and 0 changed directories.       
The localization files have changed, thus flushing the I18n XML model cache.              
File Monitor "FLOW3_TranslationFiles" detected 1 changed files and 0 changed directories. 
Forget class Cobweb\Monitoring\Controller\MonitoringController                            
Forget class Cobweb\Monitoring\Domain\Repository\MonitoringRepository                     
Reflected class names did not match class names to reflect                                
Reflecting class Cobweb\Monitoring\Controller\MonitoringController                        
Reflecting class Cobweb\Monitoring\Domain\Repository\MonitoringRepository                 
Reflected 2 emerged classes.                                                              
Built AOP proxy for class "Cobweb\Monitoring\Controller\MonitoringController".            
Building DI proxy for "Cobweb\Monitoring\Controller\MonitoringController".                
Building DI proxy for "Cobweb\Monitoring\Domain\Repository\MonitoringRepository".         
Found 2 classes whose reflection data was not cached previously.                          

The class where the problem happened is "MonitoringController".

#4 Updated by Karsten Dambekalns almost 3 years ago

  • Assigned To changed from Karsten Dambekalns to Andreas Förthner

So reflection data and DI proxy are rebuilt, could it be some security cache needs to be flushed as well?

#5 Updated by Christopher Hlubek almost 3 years ago

Sounds like the udpated / new method is not in the policy cache. I experienced the same behaviour when introducing new methods to controllers.

Karsten Dambekalns wrote:

So reflection data and DI proxy are rebuilt, could it be some security cache needs to be flushed as well?

Also available in: Atom PDF