Re: Does the CakePHP ready for 'Large Scale' web applications?
Ask MySpace what it's like to get big on really bad code. Oh that's right everyone moved to Facebook etc When success comes, it can come very fast, it's good practice to build scalable code from day-0. On Thursday, 3 February 2011 18:04:00 UTC+11, Jeremy Burns wrote: > > Always makes me chuckle when people are asking if their app can handle > Facebook style traffic. Don't waste time solving problems you don't yet > have. > > Jeremy Burns > Class Outfit > > jerem...@classoutfit.com > http://www.classoutfit.com > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Cakephp2 well designed oAuth client?
https://github.com/uzyn/cakephp-opauth Also uses $_SESSION directly. On Saturday, 15 June 2013 13:24:44 UTC+10, Mr-Yellow wrote: > > > http://www.phpclasses.org/package/7700-PHP-Authorize-and-access-APIs-using-OAuth.html > Database/session based inside vendor code, config mostly inside the class, > not immediately suitable for integrating into authcomponent while using > cake user model for storage. > > https://github.com/danielauener/cake-social-custom-auth > Works but, uses cakephp2 features correctly.. However uses 3 different > oauth consumer libs, one for each provider, to do the same thing on each. > > http://pecl.php.net/package/oauth > oAuth 1.0 only it would seem. > > What is the standard people are using? Surely this is something that just > about every app uses today. > > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Cakephp2 well designed oAuth client?
http://www.phpclasses.org/package/7700-PHP-Authorize-and-access-APIs-using-OAuth.html Database/session based inside vendor code, config mostly inside the class, not immediately suitable for integrating into authcomponent while using cake user model for storage. https://github.com/danielauener/cake-social-custom-auth Works but, uses cakephp2 features correctly.. However uses 3 different oauth consumer libs, one for each provider, to do the same thing on each. http://pecl.php.net/package/oauth oAuth 1.0 only it would seem. What is the standard people are using? Surely this is something that just about every app uses today. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Specific HABTM relation
solution is here: articles_controller function add (or edit): ... foreach($this->data['Category']['Category'] as $num => $category){ $this->data['CategoriesModel'][$num]['model_id'] = $this->data ['Article']['id']; $this->data['CategoriesModel'][$num]['category_id'] = $category; $this->data['CategoriesModel'][$num]['model'] = 'Article'; } unset($this->data['Category']); $this->Article->bindModel(array('hasMany'=>array ('CategoriesModel'))); if ($this->Article->saveAll($this->data)) { ... --~--~-~--~~~---~--~~ 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: Specific HABTM relation
I've found solution with binding models on the fly: articles_controller function add (and function edit) ... foreach($this->data['Category']['Category'] as $num => $category){ $this->data['CategoriesModel'][$num]['model_id'] = $this->data ['Article']['id']; $this->data['CategoriesModel'][$num]['category_id'] = $category; $this->data['CategoriesModel'][$num]['model'] = 'Article'; } unset($this->data['Category']); $this->Article->bindModel(array('hasMany'=>array('CategoriesModel'))); if ($this->Article->saveAll($this->data)) { ... This is well known problem (i thought that only I have complicated habtm relations) and was described here: http://teknoid.wordpress.com/2008/09/24/saving-extra-fields-in-the-join-table-for-habtm-models/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Specific HABTM relation
First some introduction... My implementation: Category HABTM Article and Article HABTM Category Category HABTM Gallery and Gallery HABTM Category Category HABTM Link and Link HABTM Category Category HABTM Document and Document HABTM Category ... Database table for joins: CREATE TABLE IF NOT EXISTS `categories_models` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `category_id` int(11) NOT NULL, `model` varchar(255) NOT NULL, `model_id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; class Category extends AppModel { var $name = 'Category'; var $hasAndBelongsToMany = array( 'Article' => array( 'className' => 'Article', 'joinTable' => 'categories_models', 'foreignKey' => 'category_id', 'associationForeignKey' => 'model_id', 'unique' => true, 'conditions' => array('CategoriesModel.model' => 'Article'), 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' ) ); } class Article extends AppModel { var $name = 'Article'; var $hasAndBelongsToMany = array( 'Category' => array( 'className' => 'Category', 'joinTable' => 'categories_models', 'foreignKey' => 'model_id', 'associationForeignKey' => 'category_id', 'unique' => true, 'conditions' => array('CategoriesModel.model' => 'Article'), 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' ) ); } Almost everything works fine after use bake command but after article save in 'categories_models' table I haven't field 'model' set to 'Article' - but fields 'category_id' and 'model_id' are correct. Does anybody have idea how to force model Article to set field `categories_models.model` to 'Article' using save functionality (and have an example for it)? Of course i could use CategoriesModel model and in controller function add separate data from form but this is my last hope solution. I think that this may be done in other way. If someone knows cakephp solution and could help .. i will be gratefull --~--~-~--~~~---~--~~ 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: Poll: what do you hate about CakePHP?
> I "hate" contributions constraints like: "Make a Unit Test" when I > report a bug or like: "Fork the project and use Git" when I just want > to update the .po file for CookBook. Amen. Search any existing issue with CakePHP and you'll find a ticket where someone reported it as a bug and had it set to "wontfix" because the dev refused to accept a problem without full tests and patches written by the poster. A bug, is a bug, is a bug. Regardless of how much of a wanker the guy reporting it is or how little info is included, still needs to be a ticket, be looked into, be fixed. -Ben --~--~-~--~~~---~--~~ 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: Poll: what do you hate about CakePHP?
> 4. Having to provide text and html bodies for email. (Should be able > to create html mail and have Cake write the text version > automatically). Having worked with email a great deal in the past, you need this control as there are quirks and customisations needed in some situations. -Ben --~--~-~--~~~---~--~~ 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: api.cakephp.org still broken
They might be, I'm an asshole for sure :-) Thing is I wasn't the person who decided I wanted to work for fame and recognition. I'm on the cash side of things rather then the open- source side of things, I realise open source people do it for different reasons, but really that's their problem. I can't be held responsible for their being no cash to motivate movement on fixes. cakephp.org isn't my site, I have no responsibility to maintain it. Submitting a bug does not have to equal submitting a fully-formed solution/patch. A bug can still be a bug without a working solution or even detailed instructions. Sometimes it's nice to know that your site is broken. Even if you don't know why. Forgive me for posting the information you needed to further hunt the major issue in your website. How I'd love to live in a world where if a user doesn't fix my site for me I can just close their ticket and the problem will fix itself. -Ben --~--~-~--~~~---~--~~ 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: api.cakephp.org still broken
Just remove the overflow attribute from the CSS and the window will no longer have a hidden overflow or scrollbar and thus will work. The bug is in your CSS not in the api documentation software. So the tickets are closed... I guess by closing the tickets that makes your site work. Look I can get around this by using 2 browsers, just thought you'd like to improve your site for other visitors, I don't care either way. So.. I'm not going to chase this around to other software vendors posting the bugs in the "proper" places. You have a problem with your site, I wrongly assumed you'd like to fix it. Continue to drive potential users away with a site that doesn't work, it doesn't concern me in the slightest if you don't see that as an issue. -Ben On May 17, 6:43 am, mark_story wrote: > Sure, there is an open bug on the firefox bugzilla. > > https://bugzilla.mozilla.org/show_bug.cgi?id=215055 > > Which has been open for 6 years. Firefox uses a 16bit api in windows > to render elements with scroll bars. However the 16bit api runs out > of numbers after 16384. So the rest of the box is not drawn, since > windows doesn't know how to address these values with a 16bit space. > The bug report at mozilla explains it better than I can though. I > know there are some people who have this issue on linux as well, but > it doesn't occur on mac os, and while I originally punted on the first > ticket opened as it is a 'browser' bug and kind of out of my hands. > I've rethought that course, and am going to do my best to work around > the issue. > > -Mark > > On May 15, 2:27 pm, Brendon Kozlowski wrote: > > > Say what? LOL. Sorry Mark, I truly am interested to understand what > > the issue was, I just don't think I really understood your > > explanation. Would you be willing to explain it further? A "nope" > > will suffice too, of course. :) > > > On May 15, 2:21 pm, mark_story wrote: > > > > The issue with Firefox is bound to Windows only. Its an issue with > > > how windows actually functions. Because the UI elements are 16bit > > > they cannot exceed the pixel dimensions of the 16bit space. So > > > mozilla is bound by shoddy windows widgets, and the Api was bound by > > > that implementation. I'm going to be redesigning the source code > > > output to fix this issue. Seeing as there is a better chance of > > > glaciers to destroying my house before Microsoft fixes 16 bit api's. > > > > -Mark > > > > On May 15, 2:03 pm, Matt Curry wrote: > > > > > I had the same problem with FF cutting off the model page at line > > > > 1820. Disabling Firebug for the API pages fixed it for me. > > > > > -Matthttp://www.pseudocoder.com > > > > > On May 15, 6:27 am, John Andersen wrote: > > > > > > Hi Burzum > > > > > > Can you open the following location in FF 3.0.10 (which I have), as I > > > > > do have the problem that the code disappears after that line! > > > > > > "http://api.cakephp.org/view_source/model/#line-1820"; > > > > > > Then return and tell me what you got! > > > > > John > > > > > > On May 15, 12:18 pm, burzum wrote: > > > > > > > I agree with AD7six, the tickets are bad, you don't even mention the > > > > > > exact version number of the browsers. That's how i expect end users > > > > > > to > > > > > > report a bug, not a developer. ;) I never had any problems with the > > > > > > API documentation and i regularly update FF, my current version is > > > > > > 3.0.10, it works also in Opera 9.64 and every version i used before. > > > > > > Also the IE8 shipped with the Win7 RC does its job. I guess that you > > > > > > can't see the source view is caused by a bad extension that filters > > > > > > or > > > > > > manipulates something.- Hide quoted text - > > > > - Show quoted text - --~--~-~--~~~---~--~~ 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: api.cakephp.org still broken
Anyone want to place bets on how long it is before the tickets are deleted and ignored? -Ben On May 15, 1:57 pm, Mr-Yellow wrote: > New Tickets: > > API Documentation fails in IEhttps://trac.cakephp.org/ticket/6376 > > API Documentation fails in FFhttps://trac.cakephp.org/ticket/6377 > > -Ben > > On May 15, 1:49 pm, Mr-Yellow wrote: > > > > > Yeah guys dropping IE is the best bet. Seeing FF doesn't work either. > > > What I should really do is stop testing in the browser that the VAST > > majority of my surfers use. > > > Take your browser fanboy crap elsewhere, I just want the documentation > > fixed so it can be viewed in a browser, any one will do. > > > -Ben- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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: api.cakephp.org still broken
New Tickets: API Documentation fails in IE https://trac.cakephp.org/ticket/6376 API Documentation fails in FF https://trac.cakephp.org/ticket/6377 -Ben On May 15, 1:49 pm, Mr-Yellow wrote: > Yeah guys dropping IE is the best bet. Seeing FF doesn't work either. > > What I should really do is stop testing in the browser that the VAST > majority of my surfers use. > > Take your browser fanboy crap elsewhere, I just want the documentation > fixed so it can be viewed in a browser, any one will do. > > -Ben --~--~-~--~~~---~--~~ 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: api.cakephp.org still broken
btw there were tickets for this but I guess they were deleted months back when this error was first reported. -Ben On May 15, 1:49 pm, Mr-Yellow wrote: > Yeah guys dropping IE is the best bet. Seeing FF doesn't work either. > > What I should really do is stop testing in the browser that the VAST > majority of my surfers use. > > Take your browser fanboy crap elsewhere, I just want the documentation > fixed so it can be viewed in a browser, any one will do. > > -Ben --~--~-~--~~~---~--~~ 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: api.cakephp.org still broken
Yeah guys dropping IE is the best bet. Seeing FF doesn't work either. What I should really do is stop testing in the browser that the VAST majority of my surfers use. Take your browser fanboy crap elsewhere, I just want the documentation fixed so it can be viewed in a browser, any one will do. -Ben --~--~-~--~~~---~--~~ 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: Multiple groups per user and ACL
You can hack ACL.php to allow this. Make it return TRUE for ALLOW, FALSE for DENY, and '' (empty string) for "NOT SET". This way code that is looking for a boolean will still detect the empty string as false. Having this option of "no permissions" allows you to have groups which don't specifically contradict other groups, combined with a "allow then deny" or "deny then allow" you can have the muliple groups interacting without the "no permissions" groups being read as a deny in your ACL setup admin UI. -Ben On May 15, 2:17 am, Misplacedme wrote: > I'm needing a slightly tougher method of verifying a users access. > There will be 3 tables. > > Users (id,username, password) > Groups (id, group_name) > group_users (id, user_id, group_id) > > I'm assuming that the acos, aros, and acos_aros tables will be used as > well, or some variation of it. > > All access is restricted from the get-go. > Each group can be given access to actions, none will restrict. > Finally, the user will be able to have individual actions that can be > granted/restricted. > > Is this even possible, or do I need to work on my own little auth > system? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
api.cakephp.org still broken
For months now the API documentation site has not been accessible to IE. The search button is stretched over the navigation area. The site is also not usable in FF as the source view loads in a div with hidden overflow which bugs. Only way to use the site is o first navigate using FF then switch to IE for viewing the source. -Ben --~--~-~--~~~---~--~~ 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: Behaviours and Parent/Child Self-Joins
bump. Should I submit this as a bug? or Is it by design? Why? Would rather get that sorted before submitting it as a bug, as most of the time tickets are set to "wontfix" -Ben On Oct 2, 3:12 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > Let me rephrase. > > I have a custom "foo" behaviour. > > By adding this behaviour to a model the afterFind callback checks the > data for fields specified in the behaviour params and creates a mirror > field "bar" with processed data from the specified field. > > Hopefully that now isn't view in model :-P > > The problem is that CakePHP doesn't seem to cascade behaviours to > every instance of that model when used via the 'threaded' find method > (or self joins in model associations). > > To my thinking, anything done in the model or attached to the model > should exist everytime that model is called regardless of the calling > method. > This allows models to be setup to be consistent without having to > worry about making it work for each different method of querying a > model. > > This has nothing to do with how I setup my MVC and where my code is. > The problem is with how models and finds fail to function as expected, > not my design. > > -Ben > > On Oct 1, 7:28 pm, AD7six <[EMAIL PROTECTED]> wrote: > > > > > On Oct 1, 9:21 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > > I have a custom wiki markup behaviour. > > > > By adding this behaviour to a model the afterFind callback checks the > > > data for fields specified in the behaviour params and create a mirror > > > field "wiki".$whateveritwascalled which has the content formatted. > > > Doesn't that scream view logic in a model?- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Behaviours and Parent/Child Self-Joins
Let me rephrase. I have a custom "foo" behaviour. By adding this behaviour to a model the afterFind callback checks the data for fields specified in the behaviour params and creates a mirror field "bar" with processed data from the specified field. Hopefully that now isn't view in model :-P The problem is that CakePHP doesn't seem to cascade behaviours to every instance of that model when used via the 'threaded' find method (or self joins in model associations). To my thinking, anything done in the model or attached to the model should exist everytime that model is called regardless of the calling method. This allows models to be setup to be consistent without having to worry about making it work for each different method of querying a model. This has nothing to do with how I setup my MVC and where my code is. The problem is with how models and finds fail to function as expected, not my design. -Ben On Oct 1, 7:28 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Oct 1, 9:21 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > I have a custom wiki markup behaviour. > > > By adding this behaviour to a model the afterFind callback checks the > > data for fields specified in the behaviour params and create a mirror > > field "wiki".$whateveritwascalled which has the content formatted. > > Doesn't that scream view logic in a model? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Behaviours and Parent/Child Self-Joins
I've tried it using coded joins rather then the automagical parent_id +threaded find. Behaviour callbacks also don't happen when you link the model to itself. Seems the only time a behaviour is attached is if you specifically call that model and that model only, any nesting or relationships seems to break behaviours odd... You'd think they'd be run everytime that model is request unless specifically requested that they don't. -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Behaviours and Parent/Child Self-Joins
Just to add. This behaviour calls a vendor and processes the markup for all the returned entries on the fields specified in the behaviour params. Thus it's faster to call this up once when the model is retrieved and process the data in one batch, then it is to put in a helper and load it up everytime a markup translation is needed. Also gives the benefit of having both versions of the content available at all times without any further processing. Anyway. Behaviour callbacks and threaded finds? -Ben On Oct 1, 7:28 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Oct 1, 9:21 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > I have a custom wiki markup behaviour. > > > By adding this behaviour to a model the afterFind callback checks the > > data for fields specified in the behaviour params and create a mirror > > field "wiki".$whateveritwascalled which has the content formatted. > > Doesn't that scream view logic in a model? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Behaviours and Parent/Child Self-Joins
No it's not view stuff. Just because it says "markup" doesn't mean it should be in a view. This is a behaviour to modify model data as it is retrieved. It's logic applied to data in a model behaviour. A helper could do a similar thing although less efficiently, however that isn't my intention, and won't solve the problem I'm having with threaded finds. This seems to be "by design" issue with behaviours not being attached on threaded finds. Is it a bug? Is it by design? Is their a work-around that doesn't involve re-coding the threaded find to call each model individually? The core shows the callback being set to true, however it's the behaviour callbacks that are lost on subsequent models. Would going back to the old way of coding a self-join in the model rather then with the automagical parent_id threaded find setup work? -Ben On Oct 1, 7:28 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Oct 1, 9:21 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > I have a custom wiki markup behaviour. > > > By adding this behaviour to a model the afterFind callback checks the > > data for fields specified in the behaviour params and create a mirror > > field "wiki".$whateveritwascalled which has the content formatted. > > Doesn't that scream view logic in a model? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Behaviours and Parent/Child Self-Joins
I have a custom wiki markup behaviour. By adding this behaviour to a model the afterFind callback checks the data for fields specified in the behaviour params and create a mirror field "wiki".$whateveritwascalled which has the content formatted. The reason for an extra field is that it allows editing of the raw data side by side with previewing of the formatted markup. When a Model:find('threaded' is performed the children don't trigger the behaviour, thus lacking the extra needed field. As such data pulled from this model, if pulled as a threaded query, is not correct as it doesn't trigger the needed behaviour to create the correct data. bug? I can see they would code it this way for speed, but really, isn't that a bug? Personally I'd rather spend that CPU on getting what was expected then save it and return something that wasn't. -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: RC1 Condition Syntax Changes
Still puts quotes around CURDATE. $where['AND']['DATE(Table.datefield)'] = '<= -!CURDATE()'; $where['AND']['DATE(Table.datefield) <='] = '-!CURDATE()'; $where['AND']['DATE(Table.datefield) <= -!'] = 'CURDATE()'; All result in variations of wrongly interpreted SQL conditions. -Ben On Jun 10, 3:39 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On Tue, Jun 10, 2008 at 10:51 AM, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > This: > > $where['AND']['Table.textfield'] = 'LIKE %word%'; > > Has been changed to: > > $where['AND']['Table.textfield LIKE'] = '%word%'; > > > This: > > $where['AND']['DATE(Table.datefield)'] = '<= -!CURDATE()'; > > Has been changed to: > > ?? > > Quoting from the release announcement > > "To help ensure that applications are secure with no extra effort on the > part of the developer, we have moved all operators used in conditions to the > "key" side. For example, $conditions = array('Model.field >' => $value); is > the new syntax. We have maintained backwards compatibility for the most > common cases, you will need to update your affected application code." > > hth > > Tarique* > * > -- > = > Cheesecake-Photoblog:http://cheesecake-photoblog.org > PHP for E-Biz:http://sanisoft.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RC1 Condition Syntax Changes
This: $where['AND']['Table.textfield'] = 'LIKE %word%'; Has been changed to: $where['AND']['Table.textfield LIKE'] = '%word%'; This: $where['AND']['DATE(Table.datefield)'] = '<= -!CURDATE()'; Has been changed to: ?? Anyone worked this one out? Whatever I try it just ends up in quotes. -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routes fail to catch root URL with query string
WTF!!! https://trac.cakephp.org/ticket/4660 Updated from wontfix to deleted Without answering any questions. That should hide the problem. geez guys, do you want people to try to help or are you only interested in playing games? -Ben On Jun 4, 11:48 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > https://trac.cakephp.org/ticket/4660 > > Seems to be an issue again > > -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Routes fail to catch root URL with query string
https://trac.cakephp.org/ticket/4660 Seems to be an issue again -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: api.cakephp.org
Stuff like this really makes me wonder. Like all the broken links in the bakery. -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple rule Validation causes Redirect to fail.
Email component loads all your helpers in as part of it's rendering of the email view into a variable. This causes the helpers to be included along with any whitespace they may have. So deeply hidden whitespace issues with EmailComponent = Helpers with whitespace -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple rule Validation causes Redirect to fail.
https://trac.cakephp.org/ticket/4714 Whitespace coming from EmailComponent. Haven't found where yet. -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple rule Validation causes Redirect to fail.
hmmm ok so I increase memory limit via htaccess until I can redirect with validation rules in with no error. However soon as I add the Email component in it gives timeouts. Somethings not right in the backend here, having trouble nailing it down, but something broken surely. -Ben On May 20, 1:26 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > It could be purely memory related, if I take out rules one by one it > reaches a point that it works regardless of what the rules actually > are. > > So I guess the validation lib needs a bunch of optimisation work done > on it, and I guess CakePHP on the whole is bound to use a crap-load of > memory given how it stores/generates/loops such large arrays all the > time (I just hope their pointers and not copied all the time). > > -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple rule Validation causes Redirect to fail.
It could be purely memory related, if I take out rules one by one it reaches a point that it works regardless of what the rules actually are. So I guess the validation lib needs a bunch of optimisation work done on it, and I guess CakePHP on the whole is bound to use a crap-load of memory given how it stores/generates/loops such large arrays all the time (I just hope their pointers and not copied all the time). -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Multiple rule Validation causes Redirect to fail.
Depending on the validation rules in my models CakePHP will fail on redirect with a PHP memory error. [code] var $validate = array( 'email' => VALID_EMAIL, 'passphrase' => VALID_NOT_EMPTY, 'displayname' => VALID_NOT_EMPTY, ); [/code] Works. [code] var $validate = array( 'slug' => array( array( 'allowEmpty' => false, 'required' => true, 'rule' => 'alphaNumeric', 'message' => 'Slug URL should only contain alpha-numeric characters.' ), array( 'rule' => array('between', 3, 30), 'message' => 'Slug URL should be between 3 and 30 characters long.' ), array( 'rule' => 'isUnique', 'message' => 'Slug URL is already in use.' ) ), 'displayname' => array( array( 'allowEmpty' => false, 'required' => true, 'rule' => 'alphaNumeric', 'message' => 'Displayname should only contain alpha-numeric characters.' ), array( 'rule' => array('between', 3, 30), 'message' => 'Displayname should be between 3 and 30 characters long.' ), array( 'rule' => 'isUnique', 'message' => 'Displayname is already in use.' ) ), 'email' => array( array( 'allowEmpty' => false, 'required' => true, 'rule' => 'email', 'message' => 'Invalid Email address.' ), array( 'rule' => 'isUnique', 'message' => 'Email is already in use.' ) ), 'passphrase' => array( array( 'allowEmpty' => false, 'required' => true, 'rule' => 'alphaNumeric', 'message' => 'Invalid Password.' ) ) ); [/code] Breaks $this->redirect. Any ideas? Whitespace in validation part of the core? -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Force Error Header
No it does seem to work... Problem is when you try to render another view it overrides, redirects or something. -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Force Error Header
bump. Does CakePHP intecept all headers and always send 200ok with a HTML error page? -Ben On Apr 22, 5:15 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > Need to return error headers for PayPal IPN. > > I've tried this in a view. However it still returns a 200ok header. > > error(500, 'Billing Error', ''); ?> > > While if I use: > > header("HTTP/1.0 500 Script error"); > and/or: > trigger_error("IPN verification failed: " . $err,E_USER_ERROR); > > It seems CakePHP grabs that and wraps it a 200ok page. > > -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Force Error Header
Need to return error headers for PayPal IPN. I've tried this in a view. However it still returns a 200ok header. error(500, 'Billing Error', ''); ?> While if I use: header("HTTP/1.0 500 Script error"); and/or: trigger_error("IPN verification failed: " . $err,E_USER_ERROR); It seems CakePHP grabs that and wraps it a 200ok page. -Ben --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Ajax->submit indicator
or not. It may be to do with me loading the form into the resComment, and the javascript not being executed but instead just being inserted via innerHTML. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Ajax->submit indicator
echo $ajax->submit('Submit Comment', array('id'=>'frmSub', 'url' => '/ articles/addComment/'.$article['Article']['id'], 'update' => 'resComment', 'indicator'=>'LoadingAjax')); Yields: // So guess it's in there, however it works on pagination but not ajax- submit for me. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Ajax->submit indicator
It appears that Ajax->submit doesn't feature the "indicator" option. Not certain if "remoteFunction" is the place where these ajax options come in, however I don't see any code referring to "indicator". There are articles/comments around that say 'indicator' exists. Doesn't seem to work. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WTF!!!! Deleted tickets
Yeah I did jump the gun, think trac needs some different less negative descriptions for things, like "wontfix" could be something less negative and more open to suggestion. While resolution deleted is ok as a description of what's happening in the backend, but "cleared" or something might save some confusion there. I don't have diffs etc, I just fix it ASAP and delete the file and reimport it from SVN if it fails. The patch I've posted as comments seems to work for everything, was just that primaryKey not being used for that part of the query construction. Meaning you'd end up with an insert to the HABTM that was "tag_id" instead of "tag" as specified in the primaryKey on the model. So definately a bug. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WTF!!!! Deleted tickets
Am I wrong? Is that just the status that has been deleted? Man that's some bad wording there if it is. If it is, I'm sorry, just used to seeing every issue for everything I need to develop enterprise systems in Cake is set to "wontfix". -Ben On Feb 26, 1:00 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > For those that want working code for HABTM using "with" and a > $primaryKey specified key name. > > Here is the patch for your model.php > > https://trac.cakephp.org/ticket/4219 > > -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WTF!!!! Deleted tickets
For those that want working code for HABTM using "with" and a $primaryKey specified key name. Here is the patch for your model.php https://trac.cakephp.org/ticket/4219 -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Model primarykey
Um.. I fixed some bugs today and provided the patch. The ticket was deleted. So much for "open" source. -Ben On Feb 26, 12:37 am, nate <[EMAIL PROTECTED]> wrote: > On Feb 24, 8:13 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > The responses to tickets relating to this issue in trac usually have > > "wontfix" and a short non-explainatory note basically saying "piss off > > and stop asking you don't need this, we know best". > > Well, I'm really sorry you read such a demeaning tone into my messages > on Trac. The fact is, whether we "know best" is not even the point. > The point is, we make decisions on what to support and what not to > support based on the driving philosophies of this project, and using > it essentially necessitates an implicit agreement with those > philosophies. > > The fact is, compound primary keys are really just not requested that > often. Even if they were, we've decided it's just not something we're > going to implement, because it adds too much overhead in terms of > complexity. You can argue about relational theory all you want, it's > simply irrelevant to the decision-making process here. When it comes > down to it, supporting multi-column primary keys is just not that > useful to *me*. Furthermore, not enough people have raised it as an > issue in order for me to go out of my way for them. > > But that's the beauty of Open Source: I as a core developer don't > *have* to implement a particular feature in order for you to use it. > If lack of support for compound primary keys is really enough of a > pain point for you, patch the code! :-) No one's stopping you. Just > don't expect me to take the extra time out of my life to implement a > feature which I personally would have no use for, nor likely ever > will. Not to mention the fact that, again, the needless complexity > that this would add completely undermines the philosophy of the > framework. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Model primarykey
So all the threads asking why you can't do compound primary keys are just my imagination then... Cool good to know I'm delusional. -Ben On Feb 26, 12:42 am, nate <[EMAIL PROTECTED]> wrote: > On Feb 25, 4:07 am, avairet <[EMAIL PROTECTED]> wrote: > > > Yes Mr Yellow, I don't understand why core team always say "wontfix"?! > > Because it's an important issue for me and many others developers, > > I hope you now understand from my comments above that whether or not > it's an issue for you personally is completely irrelevant. > > It's not an issue for me personally, and it's not an issue for most > people. Let me go a step further and say that there are a lot of > things that could be in Cake which would be very useful for me > personally, but I have the good sense not to put them there because > they're not relevant to *most people*. That's what this is about. > Not only are compound primary keys not worth it, but most people > wouldn't even make use of them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
WTF!!!! Deleted tickets
Are we missing out on a bunch of bugs in Cake due to poor management of tickets? This here is a confirmed bug. I have posted the fix. The ticket gets deleted with no resolution? I'm GOBSMACKED Well if anyone wants patches for broken bits of CakePHP, I'll post them here from now-on rather then to the ticket system. -Ben Ticket #4219 (reopened Bug) Opened 12 hours ago Last modified 8 hours ago dbo_source getConstraint hasAndBelongsToMany with primaryKey fails Reported by: mryellow Assigned to: Priority: High Milestone: Component: Databases Version: Severity: Normal Keywords: Cc: PHP Version: n/a Version From VERSION.txt: 1.2.0.6311 beta Description ¶ Tags primaryKey = "tag" Article with = TagsUsersArticle? Generates [TagsUsersArticle?.tag_id] => {$cakeIdentifier[TagArticle?.tag]$} in dbo_source. The tag_id is wrong as Tags model sets it's PK as "tag". -Ben Change History 02/24/08 19:40:33 changed by mryellow ¶ Problem starts with associationForeignKey being setup wrong. case 'associationForeignKey': if (!empty($this->{$class}->primaryKey)) { $data = $this->{$class}->primaryKey; } else { $data = Inflector::singularize($this->{$class}->table) . '_id'; } -Ben 02/24/08 23:21:19 changed by nate ¶ status changed from new to closed. resolution set to needmoreinfo. This isn't really enough information to reproduce the issue. Please attach all relevant model files and related schemas. A unit test might also be nice. 02/24/08 23:59:55 changed by mryellow ¶ status changed from closed to reopened. resolution deleted. Closed already??? I've patched it and moved on. When using "with" and a non-numeric key in a 3 way join. It would be duplicatable with a 2 way join also, the key factor being the non-numeric primarykey specified in the model. The primaryKey variable is used in 99% of the code, except for the bit I've highlighted in model.php. case 'associationForeignKey': around line 710. Thus saving a relationship into a HABTM table with a foreignkey "tag" the code generated would instead yield "tag_id" (a non-existent field). The above code patch failed when using some other types of relationships. Add the check for "id" as the primaryKey value. [code] case 'associationForeignKey': if (!empty($this->{$class}->primaryKey) && $this->{$class}- >primaryKey != 'id') { $data = $this->{$class}->primaryKey; } else { $data = Inflector::singularize($this->{$class}->table) . '_id'; } /code -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Model primarykey
The responses to tickets relating to this issue in trac usually have "wontfix" and a short non-explainatory note basically saying "piss off and stop asking you don't need this, we know best". -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakephp 1.2 pagination problem.
Sorry google sent me to a single msg page instead of the thread page, didn't see the rest. -Ben On Feb 21, 10:21 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > http://www.domain.com/controller/action/test/test:1/page:2 > results > in:http://www.domain.com/controller/action/page:1http://www.domain.com/controller/action/page:3 > > -Ben > > On Feb 20, 10:26 am, "Mouse[ON]" <[EMAIL PROTECTED]> wrote: > > > > > hi guys, > > > maybe someone could help me, today i hit a wall when working with > > pagination on cakephp 1.2. maybe somewhere this problem was solved, > > but my eyes will soon pop out from looking at google results. > > > i wanted to ask maybe someone knows how to make $paginator->sort > > helper to make url with my passed params. srr for my bad english, i'll > > try to explain this by urls if you didn't understand what i wanted to > > say. > > > for example when i use sort helper it makes me link like: > > >http://domain/controller/action/page:1/sort:fieldd/direction:asc > > > but i need that it would create url with additional params, for > > example if i go to > > >http://domain/controller/action/PARAM > > > i need sort helper to make link > > >http://domain/controller/action/PARAM/page:1/sort:fieldd/direction:asc > > > instead it creates link without my param > > ->http://domain/controller/action/page:1/sort:fieldd/direction:asc > > > please guys if someone knows solution post it. > > > again srr for my bad english. > > > thank you.- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakephp 1.2 pagination problem.
http://www.domain.com/controller/action/test/test:1/page:2 results in: http://www.domain.com/controller/action/page:1 http://www.domain.com/controller/action/page:3 -Ben On Feb 20, 10:26 am, "Mouse[ON]" <[EMAIL PROTECTED]> wrote: > hi guys, > > maybe someone could help me, today i hit a wall when working with > pagination on cakephp 1.2. maybe somewhere this problem was solved, > but my eyes will soon pop out from looking at google results. > > i wanted to ask maybe someone knows how to make $paginator->sort > helper to make url with my passed params. srr for my bad english, i'll > try to explain this by urls if you didn't understand what i wanted to > say. > > for example when i use sort helper it makes me link like: > > http://domain/controller/action/page:1/sort:fieldd/direction:asc > > but i need that it would create url with additional params, for > example if i go to > > http://domain/controller/action/PARAM > > i need sort helper to make link > > http://domain/controller/action/PARAM/page:1/sort:fieldd/direction:asc > > instead it creates link without my param > ->http://domain/controller/action/page:1/sort:fieldd/direction:asc > > please guys if someone knows solution post it. > > again srr for my bad english. > > thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakephp 1.2 pagination problem.
http://api.cakephp.org/1.2/paginator_8php-source.html#00287 It seems to me that it's missing the code to pass in any existing params or the full URL of the current page. Ticket time? -Ben On Feb 20, 10:26 am, "Mouse[ON]" <[EMAIL PROTECTED]> wrote: > hi guys, > > maybe someone could help me, today i hit a wall when working with > pagination on cakephp 1.2. maybe somewhere this problem was solved, > but my eyes will soon pop out from looking at google results. > > i wanted to ask maybe someone knows how to make $paginator->sort > helper to make url with my passed params. srr for my bad english, i'll > try to explain this by urls if you didn't understand what i wanted to > say. > > for example when i use sort helper it makes me link like: > > http://domain/controller/action/page:1/sort:fieldd/direction:asc > > but i need that it would create url with additional params, for > example if i go to > > http://domain/controller/action/PARAM > > i need sort helper to make link > > http://domain/controller/action/PARAM/page:1/sort:fieldd/direction:asc > > instead it creates link without my param > ->http://domain/controller/action/page:1/sort:fieldd/direction:asc > > please guys if someone knows solution post it. > > again srr for my bad english. > > thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: User Management\Login\Auth Framework
Oh also a good idea to add HumanCheck or some kind of CAPTCHA on the forgotpassword and register pages (even if turned off by default you may need it later) -Ben On Feb 8, 4:10 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > DAuth (patch in forgotpassword etc) + Cake ACL (patch in multi-groups > or whatever) > > Good > start:http://www.realm3.com/articles/setting_up_user_groups_with_acl_and_au... > > -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: User Management\Login\Auth Framework
DAuth (patch in forgotpassword etc) + Cake ACL (patch in multi-groups or whatever) Good start: http://www.realm3.com/articles/setting_up_user_groups_with_acl_and_auth_in_cakephp_1.2 -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ACL caching?
Cake1.2 var $cacheQueries = true; In cake/libs/model/db_acl.php I thought the URL below was where I saw the docs say that it should be true for ACL (can't see that anymore), however when I set it to true the cache wasn't cleared when modifications were made as intended. http://api.cakephp.org/1.2/class_model.html#75f9b4a0f5c2080e6c31b1121d0b5ff3 So short answer is "maybe not", with an "unintended results". -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sessions, redirects and setFlash
Ok got it on my end.. Hopefully this can help some others. Problem is in the example code for DAuth user login controller. $this->DAuth->newSalt(); $this->Session->setFlash($error); This resets the message all the time with a blank var ($error is blank unless there has been one) Mod to something like this: $this->DAuth->newSalt(); if (!$this->Session->check('Message.flash') && $error != '') { $this->Session->setFlash($error); } -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sessions, redirects and setFlash
Ok I've been through it from top to bottom on the writing side of things, sessions, flash code etc. Seems that there is something cleaning up the message value before it gets to the session helper $session->flash(); Before the view (debug($_SESSION) at the top and no message). the message is deleted but everything else remains, even the flash related array. Then once $session->flash(); is called in the view the remaining flash array entries are cleaned up. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sessions, redirects and setFlash
debug(compact('message', 'layout', 'params')); Array ( [message] => foobar [layout] => default [params] => Array ( ) ) That's the debug from the compact that goes into the write inside setFlash. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sessions, redirects and setFlash
http://au2.php.net/session_write_close The discussion here seems to indicate a PHP problem of some kind on some systems. or Some missing stuff in cake to garbage collect for all situations? or Well my problem seems to point elsewhere.. __start in setFlash? I encounter the problem with 1.2 + setFlash + redirect. However my old session data (set on previous writes) still exists. Anything set with Session->write works also, while the rest of the setFlash array is present also. Just the message is missing. $this->Session->setFlash('foobar'); $this->Session->write('foo','bar'); $this->redirect(array('controller'=>'users','action'=>'login'), null, true); Resulting debug of $_SESSION: [Message] => Array ( [flash] => Array ( [message] => [layout] => default [params] => Array ( ) ) ) [foo] => bar -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Limited number of Conditions??
Tried error_reporting with no results. Found it tho, lil odd. if (!isset($this->params['url']['hasflv'])) { $this->params['url']['hasflv'] = 0; } else if ($this->params['url']['hasflv']=='1') { $this->params['url']['hasflv'] = 1; } Later I had if (isset($this->params['url']['hasflv'])) { Added... else { $this->params['url']['hasflv'] = 0; } Changed if ($this->params['url']['hasflv']=='1') { Stange as that statement should have worked and detected it as isset even if 0. Extra strange in that simply adding another element to a totally different array would trigger the bug. I think that was the but anyway. Who can say It works now. -Ben On Dec 13, 2:08 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > $arrWhere = array(); > > $arrWhere['DATE(Pack.PackDate)'] = '<= -!CURDATE()'; > > $arrWhere['Pack.Flag_Pub'] = 1; > > $arrWhere['Pack.Flag_HasFLV'] = 1; > > $arrWhere['Flag_SMailOut'] = 1; > > $arrWhere['Flag_SMailRec'] = 1; > > //$arrWhere['Flag_Clipped'] = 1; > > //$arrWhere['Flag_Creative'] = 1; > > //$arrWhere['Flag_AutoBan'] = 1; > > //$arrWhere['Flag_Rdy'] = 1; > > //$arrWhere['Flag_Pub'] = 1; > > //$arrWhere['Flag_Email'] = 1; > > > These aren't my actually conditions, simplier ones for testing. > > > Soon as I go over 5 conditions Cake1.2 responds with a blank page. > > do you have debug set above 0? what do your server logs say? > > cheers, > > jb > > -- > > jon bennett > w:http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Limited number of Conditions??
Just tried putting them inside an 'AND' and no go -Ben On Dec 13, 12:12 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > $arrWhere = array(); > $arrWhere['DATE(Pack.PackDate)'] = '<= -!CURDATE()'; > $arrWhere['Pack.Flag_Pub'] = 1; > $arrWhere['Pack.Flag_HasFLV'] = 1; > $arrWhere['Flag_SMailOut'] = 1; > $arrWhere['Flag_SMailRec'] = 1; > //$arrWhere['Flag_Clipped'] = 1; > //$arrWhere['Flag_Creative'] = 1; > //$arrWhere['Flag_AutoBan'] = 1; > //$arrWhere['Flag_Rdy'] = 1; > //$arrWhere['Flag_Pub'] = 1; > //$arrWhere['Flag_Email'] = 1; > > These aren't my actually conditions, simplier ones for testing. > > Soon as I go over 5 conditions Cake1.2 responds with a blank page. > > -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Limited number of Conditions??
$arrWhere = array(); $arrWhere['DATE(Pack.PackDate)'] = '<= -!CURDATE()'; $arrWhere['Pack.Flag_Pub'] = 1; $arrWhere['Pack.Flag_HasFLV'] = 1; $arrWhere['Flag_SMailOut'] = 1; $arrWhere['Flag_SMailRec'] = 1; //$arrWhere['Flag_Clipped'] = 1; //$arrWhere['Flag_Creative'] = 1; //$arrWhere['Flag_AutoBan'] = 1; //$arrWhere['Flag_Rdy'] = 1; //$arrWhere['Flag_Pub'] = 1; //$arrWhere['Flag_Email'] = 1; These aren't my actually conditions, simplier ones for testing. Soon as I go over 5 conditions Cake1.2 responds with a blank page. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Has and belongs to many, with extra columns
Went looking for the code I had sorted for this but can't find it right now. Cake 1.2 + the "with" model attribute. Involves creating a model for the join and telling it's children which table to use for the join. One problem is Cake doesn't allow you to use the combined FKs as PK. So you need an auto-number in your bridge table (e). So make sure you add another unique index to keep the bridge table data clean. -Ben On Dec 12, 10:31 am, MonkeyGirl <[EMAIL PROTECTED]> wrote: > Hi. > > Thanks for your help before, everyone... This one's just a quick > question. I'm pretty sure the answer's "just make the new model and > stop being lazy", but I'd like to make sure just in case. > > I've got a project with a has-and-belongs-to-many relationship, > linking a products table to a features table, so that each product can > have several features, and each feature can have several products. > I've got a form where you tick all the features you want each product > to have, and thanks to CakePHP I don't even have to write any complex > code to work out which ticks are new and which have gone, it > automatically works all of that out. Brilliant. > > Now the client wants some of these features to be "key features", > meaning I'll need to put in an extra boolean type column in the > linking table to say if any of the ticked features are extra specially > important to that particular product or not. My question is this: do I > need to replace this simple HABTM relationship with two regular > belongs-to/has-many relationships, and make a proper model for the > linking table? > > Sorry to trouble you with a question that I'm pretty sure I already > know the answer to, but I'd really be kicking myself if I found out > HABTM relationships can handle extra information about the linking > table. > > Thank you very much, > Zoe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple OR Likes
Was this typed right? array( 'Foo.Cat' => 'LIKE a%', array( 'Foo.Cat' => 'LIKE b%' ), array( 'Foo.Cat' => 'LIKE c%' ) ); They have to be nested like that or did you mean. array( array( 'Foo.Cat' => 'LIKE a%' ), array( 'Foo.Cat' => 'LIKE b%' ), array( 'Foo.Cat' => 'LIKE c%' ), ) ? -Ben On Dec 12, 6:40 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Dec 12, 7:23 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > Lets say I want. > > > Foo = 1 > > AND > > Bar = '2' > > AND > > (Cat LIKE 'a%' OR Cat LIKE 'b%' OR Cat LIKE 'c%') > > > Tried just about everything. > > I am pretty sure you didn't try: > > $constraint['FooModel.FooField'] = 1; > $constraint['BarModel.BarField'] = 2; > $constraint['OR'] = array('Foo.Cat' => 'LIKE a%', array('Foo.Cat' => > 'LIKE b%'), array('Foo.Cat' => 'LIKE c%')); > $results = $this->FooModel->findAll($constraint); > > Or something very similar. > > > How can it be this hard??? > > How hard? > > > Why are there so many users not able to get queries to work in so many > > situations? Does it mean the overall design of the query construtor is > > broken and unusable for most? > > Who have you been talking to? > > > Is there anywhere that shows a array layout for a decent query with > > mutliple conditions and depths of logic? > > If you want a specific example, ask a specific question (here or on > the irc channel). > > > All the examples I can find are very 2D and only include 1 table, and > > never 2 'AND' conditions on the same field unless using IN array. > > The /only/ thing you need to be aware of, and in reality it is > obvious, is that if you write array('identicalKey' => x, 'identicalKey > => y) you are overwriting the first definition with the second. See > first example for one way to avoid that. > > hth, > > AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Multiple OR Likes
That's the funny thing, half the examples out there are people telling you to assign the same key with different values, which of course doesn't work. What about multiple OR with ANDs inside? Nested arrays? As for who I've been talking to, there are so many threads on this stuff that it's obviously not intuitive. -Ben On Dec 12, 6:40 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Dec 12, 7:23 am, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > Lets say I want. > > > Foo = 1 > > AND > > Bar = '2' > > AND > > (Cat LIKE 'a%' OR Cat LIKE 'b%' OR Cat LIKE 'c%') > > > Tried just about everything. > > I am pretty sure you didn't try: > > $constraint['FooModel.FooField'] = 1; > $constraint['BarModel.BarField'] = 2; > $constraint['OR'] = array('Foo.Cat' => 'LIKE a%', array('Foo.Cat' => > 'LIKE b%'), array('Foo.Cat' => 'LIKE c%')); > $results = $this->FooModel->findAll($constraint); > > Or something very similar. > > > How can it be this hard??? > > How hard? > > > Why are there so many users not able to get queries to work in so many > > situations? Does it mean the overall design of the query construtor is > > broken and unusable for most? > > Who have you been talking to? > > > Is there anywhere that shows a array layout for a decent query with > > mutliple conditions and depths of logic? > > If you want a specific example, ask a specific question (here or on > the irc channel). > > > All the examples I can find are very 2D and only include 1 table, and > > never 2 'AND' conditions on the same field unless using IN array. > > The /only/ thing you need to be aware of, and in reality it is > obvious, is that if you write array('identicalKey' => x, 'identicalKey > => y) you are overwriting the first definition with the second. See > first example for one way to avoid that. > > hth, > > AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Multiple OR Likes
Lets say I want. Foo = 1 AND Bar = '2' AND (Cat LIKE 'a%' OR Cat LIKE 'b%' OR Cat LIKE 'c%') Tried just about everything. How can it be this hard??? Why are there so many users not able to get queries to work in so many situations? Does it mean the overall design of the query construtor is broken and unusable for most? Is there anywhere that shows a array layout for a decent query with mutliple conditions and depths of logic? All the examples I can find are very 2D and only include 1 table, and never 2 'AND' conditions on the same field unless using IN array. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: findAll, associations, HABTM
http://tempdocs.cakephp.org/#TOC70554 This says " The $conditions should be formed just as they would in an SQL statement" Is the new way of doing it just pure SQL without all this array garbage that doesn't really work? -Ben On Dec 12, 4:02 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > https://trac.cakephp.org/ticket/1674 > > This is a great idea, much better then the current confusing, limited, > exploitable implementation. > > Saying "Coders should always add =" "worksforme" doesn't make it any > more secure or usable. > Coders don't know to do so, no amount of education will fix it. > > Wait for Cake to get a reputation of "wow that things full of SQL > injection exploits" then fix it. :-) > > Why is it every single ticket I look up for important issues has a > smug remark from the developers and is promptly closed? > > -Ben > > On Dec 12, 2:46 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > > > > > Needed to use 'DISTINCT Pack.PackID' hack too. > > > What does the unique attribute do in models,? Can't find it documented > > anywhere. > > > -Ben > > > On Dec 12, 12:44 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > > > > On Dec 11, 2007 7:46 PM, jon <[EMAIL PROTECTED]> wrote: > > > > > I know what you mean. I've spent three days to solve a problem that's > > > > three lines of regular PHP code and still no solution. Apparently > > > > CakePHP 'just works!' so doesn't need documentation. Yeah, well if it > > > > works, it's on minimum wage and giving surly customer service! And > > > > except for those days when it doesn't show up to work, and didn't > > > > think to call in so you've no idea where it's gone... > > > > Instead of putting down all the work that has gone into CakePHP, why > > > don't you try and solve the problem yourself? You have the source > > > code, so why can't you fix it and supply a patch. I mean, if it's > > > really so simple, it should be easy to fix. > > > > Right? > > > > I know this will shock a lot of people on this list, but the people > > > who contribute to Cake do it FOR NOTHING. As a result, bugs may tend > > > to languish far longer than they would if there was a dedicated core > > > of people getting paid to fix it. I don't know about you, but by the > > > time my day job is over I usually only have a few brain cells left to > > > devote to thinking about other projects, so I can understand why some > > > bugs sit around. > > > > I am in agreement that this bug (which is almost a year old) should be > > > looked after. Only question is, who is going to do it? Not you, from > > > the sounds of it. > > > > Associative data mapping is HARD. This bug in particular is hard. > > > Maybe I'm stupid, but this doesn't look like a non-trivial fix. It > > > requires a firm understanding of how the data mapping works, and there > > > are probably under a dozen people who fully understands how it works. > > > I am not one of those people, but I do know some of those people. > > > Hopefully one of them kept reading this thread after "Am I choosing > > > the right framework" and snarky comments about CakePHP not needing > > > documentation and giving surly customer service. I don't remember > > > anyone being promised anything. > > > > -- > > > Chris Hartjes > > > > My motto for 2007: "Just build it, damnit!" > > > > @TheKeyboard -http://www.littlehart.net/atthekeyboard-Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: findAll, associations, HABTM
https://trac.cakephp.org/ticket/1674 This is a great idea, much better then the current confusing, limited, exploitable implementation. Saying "Coders should always add =" "worksforme" doesn't make it any more secure or usable. Coders don't know to do so, no amount of education will fix it. Wait for Cake to get a reputation of "wow that things full of SQL injection exploits" then fix it. :-) Why is it every single ticket I look up for important issues has a smug remark from the developers and is promptly closed? -Ben On Dec 12, 2:46 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > Needed to use 'DISTINCT Pack.PackID' hack too. > > What does the unique attribute do in models,? Can't find it documented > anywhere. > > -Ben > > On Dec 12, 12:44 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > > > > > On Dec 11, 2007 7:46 PM, jon <[EMAIL PROTECTED]> wrote: > > > > I know what you mean. I've spent three days to solve a problem that's > > > three lines of regular PHP code and still no solution. Apparently > > > CakePHP 'just works!' so doesn't need documentation. Yeah, well if it > > > works, it's on minimum wage and giving surly customer service! And > > > except for those days when it doesn't show up to work, and didn't > > > think to call in so you've no idea where it's gone... > > > Instead of putting down all the work that has gone into CakePHP, why > > don't you try and solve the problem yourself? You have the source > > code, so why can't you fix it and supply a patch. I mean, if it's > > really so simple, it should be easy to fix. > > > Right? > > > I know this will shock a lot of people on this list, but the people > > who contribute to Cake do it FOR NOTHING. As a result, bugs may tend > > to languish far longer than they would if there was a dedicated core > > of people getting paid to fix it. I don't know about you, but by the > > time my day job is over I usually only have a few brain cells left to > > devote to thinking about other projects, so I can understand why some > > bugs sit around. > > > I am in agreement that this bug (which is almost a year old) should be > > looked after. Only question is, who is going to do it? Not you, from > > the sounds of it. > > > Associative data mapping is HARD. This bug in particular is hard. > > Maybe I'm stupid, but this doesn't look like a non-trivial fix. It > > requires a firm understanding of how the data mapping works, and there > > are probably under a dozen people who fully understands how it works. > > I am not one of those people, but I do know some of those people. > > Hopefully one of them kept reading this thread after "Am I choosing > > the right framework" and snarky comments about CakePHP not needing > > documentation and giving surly customer service. I don't remember > > anyone being promised anything. > > > -- > > Chris Hartjes > > > My motto for 2007: "Just build it, damnit!" > > > @TheKeyboard -http://www.littlehart.net/atthekeyboard- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: findAll, associations, HABTM
Needed to use 'DISTINCT Pack.PackID' hack too. What does the unique attribute do in models,? Can't find it documented anywhere. -Ben On Dec 12, 12:44 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Dec 11, 2007 7:46 PM, jon <[EMAIL PROTECTED]> wrote: > > > > > I know what you mean. I've spent three days to solve a problem that's > > three lines of regular PHP code and still no solution. Apparently > > CakePHP 'just works!' so doesn't need documentation. Yeah, well if it > > works, it's on minimum wage and giving surly customer service! And > > except for those days when it doesn't show up to work, and didn't > > think to call in so you've no idea where it's gone... > > Instead of putting down all the work that has gone into CakePHP, why > don't you try and solve the problem yourself? You have the source > code, so why can't you fix it and supply a patch. I mean, if it's > really so simple, it should be easy to fix. > > Right? > > I know this will shock a lot of people on this list, but the people > who contribute to Cake do it FOR NOTHING. As a result, bugs may tend > to languish far longer than they would if there was a dedicated core > of people getting paid to fix it. I don't know about you, but by the > time my day job is over I usually only have a few brain cells left to > devote to thinking about other projects, so I can understand why some > bugs sit around. > > I am in agreement that this bug (which is almost a year old) should be > looked after. Only question is, who is going to do it? Not you, from > the sounds of it. > > Associative data mapping is HARD. This bug in particular is hard. > Maybe I'm stupid, but this doesn't look like a non-trivial fix. It > requires a firm understanding of how the data mapping works, and there > are probably under a dozen people who fully understands how it works. > I am not one of those people, but I do know some of those people. > Hopefully one of them kept reading this thread after "Am I choosing > the right framework" and snarky comments about CakePHP not needing > documentation and giving surly customer service. I don't remember > anyone being promised anything. > > -- > Chris Hartjes > > My motto for 2007: "Just build it, damnit!" > > @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: findAll, associations, HABTM
The new "with" attribute seems to go some way to fixing it, however the functionality has changed since first included and the tutorials out there are dated. If you include a model for your HABTM "with", then query that model. Sorry for the non-naming convention tables, from older legacy system. Packs many Cast, Cast many Packs Model: Pack var $hasAndBelongsToMany = array( 'Cast' => array('className' => 'Cast', 'joinTable' => 'brgPackModel', 'foreignKey' => 'PackID', 'associationForeignKey' => 'ModelID', 'with' => 'PacksCast', 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'unique' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => ''), Model: Cast var $hasAndBelongsToMany = array( 'Pack' => array('className' => 'Pack', 'joinTable' => 'brgPackModel', 'foreignKey' => 'ModelID', 'associationForeignKey' => 'PackID', 'with' => 'PacksCast', 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'unique' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => ''), Model: PacksCast (HABTM) var $name = 'PacksCast'; var $useTable = 'brgPackModel'; var $belongsTo = array( 'Pack' => array('className' => 'Pack', 'foreignKey' => 'PackID', 'conditions' => '', 'fields' => '', 'order' => '', 'counterCache' => ''), 'Cast' => array('className' => 'Cast', 'foreignKey' => 'ModelID', 'conditions' => '', 'fields' => '', 'order' => '', 'counterCache' => ''), ); Then. I unbind the Packs from the Cast so we don't get a full return in there. As recursion 2 was needed. $this->Pack->Cast->unbindModel(array('hasAndBelongsToMany' => array('Pack'))); $this->set('Packs', $this->Pack->PacksCast->findAll($arrWhere, NULL, array('Pack.PackDate' => 'DESC'), 50, NULL,2)); This creates an UNGODLY amount of queries, with it pulling categories, sites, and other tables over and over again. Works, Pretty ugly queries, think raw SQL would be much faster to run. As for writting CakePHP I think that would be better left to those with an eye on the direction and conventions of the project, those who should realise this is a feature at the basis of being able to use CakePHP for DB access. Without full and proper database support, raw SQL is much faster and easier to use, so what if a few servers might not like a query here or there. Kind of defeats the purpose of RAD when takes 10x as long to write a query in Cake as it does in SQL, then said query runs twice as slow do to being broken into 50 parts and looping through everything to construct arrays. -Ben On Dec 12, 12:44 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Dec 11, 2007 7:46 PM, jon <[EMAIL PROTECTED]> wrote: > > > > > I know what you mean. I've spent three days to solve a problem that's > > three lines of regular PHP code and still no solution. Apparently > > CakePHP 'just works!' so doesn't need documentation. Yeah, well if it > > works, it's on minimum wage and giving surly customer service! And > > except for those days when it doesn't show up to work, and didn't > > think to call in so you've no idea where it's gone... > > Instead of putting down all the work that has gone into CakePHP, why > don't you try and solve the problem yourself? You have the source > code, so why can't you fix it and supply a patch. I mean, if it's > really so simp
Re: findAll, associations, HABTM
Hacking the core really wouldn't do it for me, I guess the only proper way to use Cake is with hardcoded queries. As without this simple ability I'd rate the database abstraction as "broken". Has it really be a year since the bug was posted??? Nothing? Am I choosing the wrong framework? -Ben On Dec 11, 7:58 pm, "websta*" <[EMAIL PROTECTED]> wrote: > Yeah this is one that has plagued me too. I found some code for a workaround > by defining a simple extra association in your model, and requiring some > small changes to the model::find method that can be implemented in your > app_model. I found this code in the bakery I think, modded it a bit though > to bring it up to date a bit. I don't have details or code with me right > now, but will dig it out. > > While far from being what I would consider a complete or ideal fix to this, > it got me up and running in the time frame I had, as I too came up short > looking for clues on this. > > Id be keen to hear any comments on this*, does it really not work, or is > there something simple some of us are missing?? > > *that is searching a model based on its habtm associated model records. > > > > -Original Message- > From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > > Of Mr-Yellow > Sent: Tuesday, 11 December 2007 7:17 p.m. > To: Cake PHP > Subject: findAll, associations, HABTM > > https://trac.cakephp.org/ticket/633https://trac.cakephp.org/ticket/1209http://groups.google.pl/group/cake-php/browse_thread/thread/d9468ba78... > > So it's broken and has been for a year? > > This is really odd. to my thinking, without findAll working > properly then the whole database abstraction is a waste of time and > it's better to use raw SQL in controllers then use Cakes models that > don't really connect? > > -Ben > > __ NOD32 2714 (20071210) Information __ > > This message was checked by NOD32 antivirus system.http://www.eset.com- Hide > quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
findAll, associations, HABTM
https://trac.cakephp.org/ticket/633 https://trac.cakephp.org/ticket/1209 http://groups.google.pl/group/cake-php/browse_thread/thread/d9468ba788c5ac2c/fb23c6ada4ae8ccd?#fb23c6ada4ae8ccd So it's broken and has been for a year? This is really odd. to my thinking, without findAll working properly then the whole database abstraction is a waste of time and it's better to use raw SQL in controllers then use Cakes models that don't really connect? -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $form->checkbox having troubles.
So what is the hidden field? I imagine it keeps defaults or something. Seems strange that there is no native way to do multiple grouped checkboxes, have to hack it instead of Cake properly appending the data onto the name instead of the value. -Ben On Nov 9, 6:00 am, maschoen <[EMAIL PROTECTED]> wrote: > I've figured out what the strange hidden inputs are about. The only > big issue I have is why type="checkbox" is repeated. > This might not seem like a big problem, but I sometimes have to run > the generated HTML through an XML parser. This is a first step to > converting it to a JSON string to return an XMLHTTP request. The > problem is that the XML parser barfs on the duplicate attribute. > It's very picky. > > Anyone know why the duplicate type= or how to stop it? > > Thanks again --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Composite Primary Keys
Oh just to let you know. Yes I do know what a Unique Index is. We don't really need fanboys to come yell at us that it's 2007. The year doesn't change the fact that doing stuff on the DB engine is safer then in your software. Validation is still very important, but a properly setup database is better. Instead some intelligent discussion that isn't closed off by mods would be nice. Oh as for the comment that it breaks REST. You'd just specify both IDs as you should always, using some surrogate key just introduces the chance for bugs, while meaning any database migration in future could be jeopardised. Flame away. -Ben On Nov 9, 4:31 pm, Mr-Yellow <[EMAIL PROTECTED]> wrote: > YaY!!! > > Nice to know I just spent months designing a massive properly > normalised and indexed database. > Only to findout Cake doesn't support properly designed databases. > > Lock this thread too, just to make sure discussion of their benefit is > quashed and discovery of the feature hole is less obvious. Makes it > easy when this point isn't very well documented and it's so far from > the norm. > > -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Composite Primary Keys
YaY!!! Nice to know I just spent months designing a massive properly normalised and indexed database. Only to findout Cake doesn't support properly designed databases. Lock this thread too, just to make sure discussion of their benefit is quashed and discovery of the feature hole is less obvious. Makes it easy when this point isn't very well documented and it's so far from the norm. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: I want gData
Zend seems like a mess to me -Ben On Nov 7, 8:46 pm, "Mikee Freedom" <[EMAIL PROTECTED]> wrote: > You can incorporate the Zend framework in to your application : > > http://www.google.co.uk/search?q=cakephp+zend+framework&ie=utf-8&oe=u... > > On 07/11/2007, keymaster <[EMAIL PROTECTED]> wrote: > > > > > > > Not sure how much mileage you're going to get out of a blunt "I want".- > > Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
I want gData
https://trac.cakephp.org/ticket/723 I don't think it matters that gData is proprietry as it is now becoming a foundation for more open standards For example OpenSocial. For a CakePHP developer to create an AtomPub backend for OpenSocial they will likely need a gData generator/wrapper. -Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---