Re: cakephp don't execute model trigger plugin's
for eg. ?php class SectionsController extends LikecontentAppController { public $helpers = array ('Html', 'Form', 'Text'); public $uses = array ('Likecontent.LikecontentSection','Likecontent.LikecontentContent'); [...] function admin_edit($id = null) { $this-layout = 'admin'; if (! $id empty ( $this-data )) { $this-Session-setFlash ( __ ( 'Invalid LikecontentSection', true ) ); $this-redirect ( array ('action' = 'index' ) ); } if (!empty ( $this-data )) { if ($this-LikecontentSection-save ( $this-data )) { $this-Session-setFlash ( __ ( 'The LikecontentSection has been saved', true ) ); $this-redirect ( array ('admin' = true, 'action' = 'index' ) ); } else { $this-Session-setFlash ( __ ( 'The LikecontentSection could not be sa [] ? On 3 Paź, 23:26, Bert Van den Brande cyr...@gmail.com wrote: Can you show some code where the save() is called ? On Sat, Oct 3, 2009 at 7:55 PM, andrzejborkow...@gmail.com andrzejborkow...@gmail.com wrote: save section is ok, but this triger beforeSave don't execute and dont return any value, only working trigers are in LikecontentAppModel whats going one ? ?php class LikecontentSection extends LikecontentAppModel { public $validate = array( 'title' = array('notempty'), 'text' = array('notempty') ); //The Associations below have been created with all possible keys, those that are not needed can be removed public $hasMany = array('Likecontent.LikecontentContent'); public function beforeSave(){ echo 'dupa'; exit; if(empty($this-data['LikecontentSection']['text']) || empty($this- data['LikecontentSection']['url']) || $this-data ['LikecontentSection']['subpage'] == 0){ $this-data['LikecontentSection']['text'] = ''; $this-data['LikecontentSection']['url'] = ''; } return true; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: form plugin
i solved this problem by add LikecontentSection to fieldname echo $form-input('LikecontentSection.title'); On 9 Wrz, 19:49, andrzejborkow...@gmail.com andrzejborkow...@gmail.com wrote: WTF loks at namespaces LikecontentSection Section my VIEW ?php echo $form-create('Section',array ('plugin'='likecontent','controller'='sections','action'='add'));? fieldset legend?php __('Add');?/legend ?php echo $form-input('parent',array('empty'='('.__('general category',true).')')); echo $form-input('title'); echo $form-input('desc'); echo $form-input('more'); ? MODEL before save debug Array ( [LikecontentSection] = Array ( [view] = yes [Section] = Array ( [parent_id] = [title] = strona główna [desc] = strona glowna agreguje wsytzskie najnowsze informacje ktore pojawiaja sie na stronie naszej funmdacji [more] = ) [modified] = 2009-09-09 17:45:35 [created] = 2009-09-09 17:45:35 [lft] = 1 [rght] = 2 ) ) Why i have 2 dimension and stupid query Query: INSERT INTO `likecontent_sections` (`view`, `modified`, `created`, `lft`, `rght`, `url`) VALUES ('yes', '2009-09-09 17:45:35', '2009-09-09 17:45:35', 1, 2, '') --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: layzy loading
nice one On 5 Wrz, 22:06, Miles J mileswjohn...@gmail.com wrote: Here you go, this will do what your asking for model associations. http://www.pseudocoder.com/archives/2009/04/17/on-the-fly-model-chain... But yes, since it supports PHP 4 it wont do lazyloading, its a future feature. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Possible ACL or Cookie Issue When I Reload Page
i have the similar situation with auto complete and many ajax reuests - my user after many request to controller has logout when i cut url and paste in browser user has goback login. this is the stupid situation. On 9 Wrz, 23:49, hahmadi82 hahmad...@gmail.com wrote: There's a very peculiar problem with my site that I can't quite figure out. My garage page loads/displays information from the database based on the users current session that's logged in. The user_id used to load the information is set to $this-Auth-user('id'). However, if you reload the page repeatedly real fast, all the data comes in as blank and I get a mysql error saying that the user_id is not set. At this point, if I click on a different page and go back to the garage page the data loads fine again. This issue also occurs if you sit on the garage page for, lets say, 30 minutes and push reload once. The data doesn't load and I get the error until I click on a different page. Why is this happening? -- View this message in context:http://www.nabble.com/Possible-ACL-or-Cookie-Issue-When-I-Reload-Page... Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: change route after authroize users
i know that but i want change general route '/' so yes your trick witch redirect working after user did login but after even go to / load default general route from / but i'll try user Route::conntect in login() :) On 31 Sie, 10:32, Aivaras faifas1...@gmail.com wrote: Hey, did you take a look at thishttp://book.cakephp.org/view/391/loginAction? Faifas On Mon, Aug 31, 2009 at 11:05, andrzejborkow...@gmail.com andrzejborkow...@gmail.com wrote: i want to change default route after login my users, i try like this: [/project/app_controller.php] public function beforeFilter() { (...) if($this-Auth-user()){ Router::connect('/', array('controller' = 'users', 'action' = 'profile')); Router::promote(); } but it dont work and still active first default route form route.php.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: change route after authroize users
oh, I get what you mean. You want to display different content for loggen in and guest users. You know, it's so hard to do that, but the key to cakePHP is that you actually need to think simple. I mean not programmer's simple, but - simple. What I did is I used a different layout! good trick ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: wtf find id=1
$this-Position-find('all',array('conditions' = 'position_id = '. $id,'fields'='position,position_id') this working fine... 9 SELECT `Position`.`position`, `Position`.`position_id` FROM `mgt_positions` AS `Position` WHERE position_id = 3 fucking stupid bug On 14 Sie, 02:18, andrzejborkow...@gmail.com andrzejborkow...@gmail.com wrote: fk find(){ echo $id; //3 debug($this-Position-find('all',array('conditions' = array ('position_id'=$id),'fields'='position,position_id'))); } at page miopromo\controllers\signups_controller.php (line 70) Array ( [0] = Array ( [Position] = Array ( [position] = Wlasciciel/Wspolwlasciciel [position_id] = 1 ) ) 9 SELECT `Position`.`position`, `Position`.`position_id` FROM `mgt_positions` AS `Position` WHERE `position_id` = 1 WTF ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: invalid tree model struct in Xml
this working right $arr['data']['Invoice'] = $invoice['Invoice']; $arr['data']['Client'] = $invoice['Client']; $arr['data']['Seller'] = $invoice['Seller']; $arr = new Xml($arr); echo 'pre'; echo $arr; //echo new Xml($invoice['Client']); echo '/pre'; debug(Set::reverse($arr)); On May 28, 12:53 pm, andrzejborkow...@gmail.com andrzejborkow...@gmail.com wrote: so i have problem with Xml component my arry from find loks like that array( [Invoice] = array(...) [Seler] = array(...) so its good... after $xml = new Xml($invoice); xml loks like that (this is stupid...) invoice ... /seler .../invoice after $result = Set::reverse($xml); arr loks like bad... that array( [Invoice] = array( [Seler] = array(...) ) full example App::import('Core','Xml'); debug($arr); $xml = new Xml($arr); debug($xml); $arr = Set::reverse($xml); debug($arr); exit; whats wrong ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakeFest Berlin 2009 officially announced
We will be there big rgd AgBorkowski http://lowcy.com.pl On 24 Mar, 06:24, Nate nate.ab...@gmail.com wrote: After much hype and speculation, the next CakeFest event, which will take place in Berlin beginning July 9th, has been officially announced. You can read the full details, along with some other important announcements on the Bakery:http://bakery.cakephp.org/articles/view/cakephp-deutschland Or, go straight to the conference site here:http://cakefest.org/ If you'd like a chance to win a free pass to the conference, check outhttp://cakefest.org/pages/badges Hope to see you there! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Auth Unexpected Behavior
i have the same problem most of them in many ajax (suggest) request, strategy is simple my script after 4th+n request return sql debug after that every action were logged out at past i create fit request controler for eg. xhr_controller controller, so my fit controler loks like XhrController ext Controller{ $uses = array(); $helpers = array(); $compnenets = array('RequestHandller'); function suggest($field){ // Warning SqlInjection only eg. App:import('Model'[] } } UsersController ext AppController{ ad(){} } but my suggest request lok that /xhr/$field/q= its work fine but in my reuest i need Auth : On 29 Mar, 01:42, rartavia royarta...@gmail.com wrote: logout: thanks for your answer, i'm using mayorly (hah nice word) ajax calls for my app but there are some not ajax ones and i'm using requestAction at least one time witch is suggested using it with cache. I'll try $this-disableCache(); under requestHandler-isAjax maybe, i'll look how that works. But I think the unexpected behavior was all about what suggested JamesF, the camel cased action names. Now my real problem is swfupload /controller/upload action, where my Auth-user returns null. Again i'm using 2.2.0 Beta 5 2008-01-29 thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: email component and smtp error +OK 27407.1240210...@sword3
its my fail i had bad hostname should be: smtp.hti.pl but last error didn't tell me nothing about that On 20 Kwi, 08:52, andrzejborkow...@gmail.com andrzejborkow...@gmail.com wrote: i try sent email by $this-Email-to = $email; $config['Email']['from'] = 'andrzej.borkow...@lowcy.com.pl'; $config['Email']['fromName'] = 'a.borkowski'; $config['Email']['port'] = '110'; $config['Email']['host'] = 'poczta.hti.pl'; $config['Email']['username'] = 'andrzej.borkow...@lowcy.com.pl'; $config['Email']['password'] = 'pass'; $this-Email-smtpOptions = $config['Email']; $this-Email-subject = $subject; $this-Email-replyTo = 'AgBorkowski andrzej.borkow...@lowcy.com.pl'; $this-Email-from = 'AgBorkowski andrzej.borkow...@lowcy.com.pl'; $this-Email-delivery = 'smtp'; $this-Email-send('test'); cms\app_controller.php (line 92) +OK 27407.1240210...@sword3 anybody seen this error ? my mail has not dilivery.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: unload app_controller to force speed :)
ok problem resolved thnx for help On 27 Lut, 17:04, AgBorkowski andrzejborkow...@gmail.com wrote: generaly i do it somethong like that require_once '../xhr_controller.php'; class SuggestsController extends XhrController { public $components = array('Xhr'); public $helpers = array(); public $uses = array(); but still i see in debug app controler is active becouse script show that Nr Query Error Affected Num. rows Took (ms) 1 DESCRIBE `aros` 7 7 4 2 DESCRIBE `acos` 7 7 4 3 DESCRIBE `aros_acos` 7 7 7 4 DESCRIBE `comments` 7 7 3 5 DESCRIBE `users` 13 13 4 6 DESCRIBE `groups` 6 6 9 7 DESCRIBE `logs` i dont understand why in my SuggestController extendts XhrController extends Controler still load app controller --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: empty query and 55ms - debug
errata i means Nr 5 empty query ? On 28 Lut, 17:31, andrzejborkow...@gmail.com andrzejborkow...@gmail.com wrote: Nr Query Error Affected Num. rows Took (ms) 1 DESCRIBE `locations` 5 5 3 2 DESCRIBE `countries` 4 4 4 3 DESCRIBE `cities` 4 4 3 4 DESCRIBE `states` 3 3 3 5 0 0 42 what is n. 4 ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: unload app_controller to force speed :)
generaly i do it somethong like that require_once '../xhr_controller.php'; class SuggestsController extends XhrController { public $components = array('Xhr'); public $helpers = array(); public $uses = array(); but still i see in debug app controler is active becouse script show that Nr Query Error AffectedNum. rows Took (ms) 1 DESCRIBE `aros` 7 7 4 2 DESCRIBE `acos` 7 7 4 3 DESCRIBE `aros_acos`7 7 7 4 DESCRIBE `comments` 7 7 3 5 DESCRIBE `users`13 13 4 6 DESCRIBE `groups` 6 6 9 7 DESCRIBE `logs` i dont understand why in my SuggestController extendts XhrController extends Controler still load app controller --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---