-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving form with 2.4.2 generates loop error #9
Comments
I think I had the same problem with cakePHP 2.3 because of the way validation is done from 2.3 onward. |
This plugin is for 2.1+ require little change,
I know what you want to save |
Array
) class Group extends AppModel { public function edit($groupid = null){
|
@sergeydeg In fact, I can not guess what the problem is .. this is for cake 2.1. And he has a lot of problems. |
Actually problem is, IMHO in logic change in CakePHP since 2.1. I started using it only with newest version, but what I see, that Model::Save call Model::Validates (line 8 in stacktrace), then callback BeforeValidate fired witch going through to MultiTranslateBehavior->multiValidate() (line 17) , and then that again call Model->validates() (line 18) creating an infinitive loop. |
Any news about this issues on CakePHP 2.4 ? |
Fatal error: Maximum function nesting level of '100' reached, aborting! in E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php on line 101
Call Stack:
0.0003 361544 1. {main}() E:\htdocs\cakephp2\app\webroot\index.php:0
0.0158 3221736 2. Dispatcher->dispatch() E:\htdocs\cakephp2\app\webroot\index.php:110
0.0227 4338536 3. Dispatcher->_invoke() E:\htdocs\cakephp2\lib\Cake\Routing\Dispatcher.php:162
0.0254 4683528 4. Controller->invokeAction() E:\htdocs\cakephp2\lib\Cake\Routing\Dispatcher.php:187
0.0254 4684112 5. ReflectionMethod->invokeArgs() E:\htdocs\cakephp2\lib\Cake\Controller\Controller.php:490
0.0254 4684128 6. GroupsController->edit() E:\htdocs\cakephp2\lib\Cake\Controller\Controller.php:490
0.0438 8098488 7. Model->save() E:\htdocs\cakephp2\app\Controller\GroupsController.php:52
0.0443 8102496 8. Model->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:1738
0.0451 8254496 9. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0451 8254496 10. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0451 8254496 11. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0453 8267800 12. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0454 8268048 13. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0454 8268064 14. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0454 8270280 15. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0454 8270296 16. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0454 8270328 17. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0454 8274176 18. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0454 8274176 19. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0454 8274176 20. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0454 8274176 21. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0454 8275000 22. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0455 8275248 23. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0455 8275264 24. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0455 8277512 25. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0455 8277528 26. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0455 8277560 27. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0455 8281408 28. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0455 8281408 29. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0455 8281408 30. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0455 8281408 31. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0455 8282232 32. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0455 8282480 33. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0455 8282496 34. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0456 8284744 35. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0456 8284760 36. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0456 8284792 37. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0456 8288640 38. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0456 8288640 39. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0456 8288640 40. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0456 8288640 41. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0456 8289464 42. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0456 8289712 43. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0456 8289728 44. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0456 8292064 45. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0456 8292080 46. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0456 8292112 47. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0457 8295960 48. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0457 8295960 49. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0457 8295960 50. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0457 8295960 51. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0457 8296784 52. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0457 8297032 53. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0457 8297048 54. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0457 8299384 55. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0457 8299400 56. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0457 8299432 57. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0457 8303280 58. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0457 8303280 59. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0457 8303280 60. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0457 8303280 61. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0458 8304104 62. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0458 8304352 63. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0458 8304368 64. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0458 8306704 65. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0458 8306720 66. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0458 8306752 67. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0458 8310600 68. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0458 8310600 69. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0458 8310600 70. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0458 8310600 71. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0458 8311424 72. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0459 8311672 73. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0459 8311688 74. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0459 8314024 75. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0459 8314040 76. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0459 8314072 77. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0459 8317920 78. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0459 8317920 79. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0459 8317920 80. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0459 8317920 81. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0459 8318744 82. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0459 8318992 83. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0459 8319008 84. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0460 8321344 85. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0460 8321360 86. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0460 8321392 87. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0460 8325240 88. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0460 8325240 89. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
0.0460 8325240 90. ModelValidator->errors() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:101
0.0460 8325240 91. ModelValidator->_triggerBeforeValidate() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:243
0.0460 8326064 92. CakeEventManager->dispatch() E:\htdocs\cakephp2\lib\Cake\Model\ModelValidator.php:459
0.0460 8326312 93. call_user_func() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0460 8326328 94. ObjectCollection->trigger() E:\htdocs\cakephp2\lib\Cake\Event\CakeEventManager.php:248
0.0460 8328664 95. call_user_func_array() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0460 8328680 96. MultiTranslateBehavior->beforeValidate() E:\htdocs\cakephp2\lib\Cake\Utility\ObjectCollection.php:132
0.0461 8328712 97. MultiTranslateBehavior->_multiValidate() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:146
0.0461 8332560 98. Model->validates() E:\htdocs\cakephp2\app\Model\Behavior\MultiTranslateBehavior.php:230
0.0461 8332560 99. ModelValidator->validates() E:\htdocs\cakephp2\lib\Cake\Model\Model.php:3297
The text was updated successfully, but these errors were encountered: