Re: possible bug in inflector with irregular plurals?
ah it's ok as solution (and i have already done exactly so :P), but i think the problem remains with that particular case descripted above.. i mean, it's a bug maybe? On 2 Ago, 19:39, brian bally.z...@gmail.com wrote: How about model name SerieASquadra, table name serie_a_squadre? --~--~-~--~~~---~--~~ 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: BreadCumbs text encoding
ich habs auch nur durch try and error rausgefunden. in der api findet man nicht immer alles ;) On 29 Jul., 10:21, Benedikt R. bened...@rossgardt.de wrote: Working fine. --- Vielen Dank. Ich dachte das übergibt man als Extra-Parameter. Aber als ich in der API keinen gefunden habe war ich verwirrt :-). Grüße zurück ;-) On 29 Jul., 09:56, orbdex obohl...@googlemail.com wrote: try: echo $html-addCrumb(Finanzauml;ter,/do/something,array (escape=false)); Böses Finanzamt ;) Greetings from Mainz On 29 Jul., 02:08, Benedikt R. bened...@rossgardt.de wrote: Hi! I try to add following breadcrumb. $html-addCrumb( 'Finanzämter', '/revenues' ); (It's german.) When I output the breadcrumbs on the page, the chars get encoded the wrong way (I am using ISO-8859-1). If I try to use HTML's special characters like uuml; - they get printed as the look. I am currently running with this code to support correct ouputs: $html-addCrumb( utf8_decode('Finanzämter'), '/revenues' ); Some ideas why this happens? Regards, Benedikt --~--~-~--~~~---~--~~ 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: login: Auth not setting Session flash
?php $session-flash('auth'); ? http://book.cakephp.org/view/564/Displaying-Auth-Error-Messages On Aug 2, 9:16 pm, brian bally.z...@gmail.com wrote: Failed logins are not getting Auth's msg displayed. I've done this before but I'm about out of ideas why this isn'tworking. Can someone take a look at this and tell me what I'm missing? AppController: function beforeFilter() { $this-Auth-authorize = 'controller'; $this-Auth-fields = array('username' = 'email', 'password' = 'password'); $this-Auth-loginError = 'No matching user found.'; $this-Auth-autoRedirect = true; $this-Auth-loginAction = array( 'controller' = 'users', 'action' = 'login' ); $this-Auth-loginRedirect = array( 'controller' = 'public_static', 'action' = 'display', 'home' ); $this-Auth-logoutRedirect = array( 'controller' = 'public_static', 'action' = 'display', 'home' ); if (!$this-Session-read('User')) { $this-Auth-authError = 'Please log in'; } $admin = Configure::read('Routing.admin'); if (isset($this-params[$admin]) $this-params[$admin]) { $this-layout = 'admin'; } if ($this-RequestHandler-isAjax()) { Configure::write('debug', 0); $this-layout = 'ajax'; } } UsersController: public function login() {} layouts/plain.ctp: div id=content class=Wide ?= $session-flash() ? ?= $content_for_layout ? /div Flash messages are working properly elsewhere. It's only these login ones that are not displaying. --~--~-~--~~~---~--~~ 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: Query Opinion
In my experience with Oracle technology, the best performance is always to minimize the number of queries, so if you can grab it all in one query, that would be best! Enjoy, John On Jul 27, 5:22 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I am building a function that checks access permission. First check if profile is public, if not conditions from 2 other tables are checked and 1 of those conditions must be true to allow access. My question is should i just grab all the conditions needed to be checked with 1 query then compare the values i need to check then check the values returning true or false or do them 1 at a time So if not public run a query to check the next condition, if that returns false run the final query? Just wondering what the best way would be. Opinion? thanks Dave --~--~-~--~~~---~--~~ 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: Caching doesn't work with the routes
I have the same issue. Has anybody out there run into this or found a solution? On Jul 28, 7:07 pm, Sergei yatse...@gmail.com wrote: Hello, I'm using CakePHP 1.2.3 and it looks like caching routed actions doesn't work at all. I have a route: Router::connect('/script/:site', array('controller' = 'projects', 'action' = 'js'), array('pass'=array('site'),'site'='[A-Za- z0-9]+')); Router::parseExtensions('rss','js'); So this url is like /script/name.js is redirected to projects/js action. In projects controller i have acacheAction: var $cacheAction= array( 'js' = 1 hour, // action with route - doesn't work 'index' = 1 hour, // action without route - works ); And it just doesn't cache anything. Caching actions *without* route, like for example, projects/index, works. Is it a bug or feature, and does it have a solution? Thank you. --~--~-~--~~~---~--~~ 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: Use form helper in own helper
hm. Thank you. I'm playing around with this... I created my own helper which uses the form helper, but simply modifies some options which I otherwise need to set in every form field. The modifications are simply divs around as I need it. http://bin.cakephp.org/view/1906937659 My problem: If I use my helper to create an edit form, the already stored values are not populated in the form. Only if I write php $form-create(modelName); ? in front of it works. But that messes my code because it is populated tiwce (one with the hack, one with my helper). Anyone an idea whats the problem here? Regards, Alexander On 7 Jul., 15:50, Robert P shiftyrobs...@gmail.com wrote: I refer you tohttp://book.cakephp.org/ http://book.cakephp.org/view/102/Including-other-Helpers On Jul 7, 9:48 pm, cronet cro...@gmx.de wrote: Hi, i want to use the FormHelper in my own helper. simple helper example: function formTest($model) { App::import('Helper', 'Html'); App::import('Helper', 'Form'); $form = new FormHelper(); echo $form-create($model); echo $form-inputs(); echo $form-end(); } It ends in the following error message: Undefined property: FormHelper::$Html [CORE/cake/libs/view/helpers/ form.php, line 1033] Trying to get property of non-object [CORE/cake/libs/view/helpers/ form.php, line 1033] Undefined property: FormHelper::$Html [CORE/cake/libs/view/helpers/ form.php, line 248] Trying to get property of non-object [CORE/cake/libs/view/helpers/ form.php, line 248] It seems that i can't use the form helper in my example. Anyone tried this ? Regards --~--~-~--~~~---~--~~ 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: Check boxes for a noob
groupId doesnt seem to work either. This is what the group array looks like. [Group] = Array ( [0] = Array ( [id] = 2 [name] = Standard User [created] = 2009-07-30 21:55:03 [modified] = 2009-07-30 21:55:03 ) ) How do I pass that to the 'selected'= option so I can tell which checkboxes are selected? Do I need to tweak the array before I set it to the view? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Use session helper in js files?
Hello, Is it possible somehow to use session helper in JS files? I am loading the js file from /app/vendors so I can use php and localization strings in the js files, but I would also need to use cake sessions (read them) in the js files.. Possible? Thanks, -doze --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Change default start opage with cakephp
Exactly what I needed ,but in this case I'm not dealing with Apache Server , I want to achieve that with CakePHP core !! It may be there some function or trick to perform in order to make INDEX.HTML my startup page =) Thank you Alexandru Ciobanu Regards Abraham On Aug 3, 1:28 am, Alexandru Ciobanu ics.cake...@gmail.com wrote: On 8/3/2009 12:15 AM, Abraham Boray wrote: How Can I change the default start page default.php to default.html ,so my html page will load first nb:my html page is located in webroot the same as default.php of cake php that notify users about database status and ... I'm not sure of this but I'm taking a wild guess. You want change your DirectoryIndex order. If so you'll have to edit your apache config. and change the DirectoryIndex directive to fit your needs. Seehttp://httpd.apache.org/docs/2.2/mod/mod_dir.htmlfor more info. --~--~-~--~~~---~--~~ 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: Free Cake Ebook : How to build your own blog from scratch
so no - write in english or post in in the corresponding Malaysian cakePhp forum thats my opinion The post was in English about something written in Malay. by the way: every Malaysian developer who wants to try out cake would need to understand English anyway And therefore, most Malaysian speakers will look to an English forum for answers they can't find in their mother-tongue. This guy is simply trying to help other speakers of Malay by posting in the lingua franca of CakePHP (and most, but not all, other software). His post was clearly addressed to speakers of Malay. If you are not one of them, it's not for you so keep quiet. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Js URL
Hi, I am using CakePHP for my application. I am in the process of adding jQgrid and I am having a problem loading the language file. CakePHP complains that there is no controller for it?! I have no idea why though. I have verified that the files are all in the correct place. I have moved the language file to different locations but it made no difference. I tried loading by writing out the script tag by hand, still no difference. This is from my default layout: ?php echo $html-css('default'); echo $html-css('custom-theme/jquery-ui-1.7.2.custom'); echo $javascript-link('jquery-1.3.2.min.js'); echo $javascript-link('jquery-ui-1.7.2.custom.min.js'); echo $javascript-link('jquery.jqGrid.min.js'); echo $javascript-link('i18n/grid.local-en.js'); echo $javascript-link('jquery.json-1.3.min.js'); echo $javascript-link('app.js'); ? This is what Firebug shows me: script src=/js/i18n/grid.local-en.js type=text/javascript 1!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 2 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; 3html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en 4head 5titleMissing Controller/title $___dataForView = array( 13 controller = JsController, 14 controllerName = Js, 15 title_for_layout = Missing Controller, 16 content_for_layout = lt;h2gt;Missing Controllerlt;/h2gt; any help would be appreciated. thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Js URL
the default css does not have have a suffix nor should the js echo $html-css('default'); echo $html-css('custom-theme/jquery-ui-1.7.2.custom'); echo $javascript-link('jquery-1.3.2.min.js'); - S --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Authentication problem with ProxyPass
Hi, I am facing peculiar problem, we run a demo server for cleints, which is accessible from outside on port 0. Now the setup is such that there is a gateway server abc.xyz.com, here we have a routing setup from 0 port to port 80. So abc.xyz.com:0 - 192.168.0.xxx:80 For this we have also configured the apache in abc.xyz.com to use proxy pass. ProxyPass/demo http://192.168.0.xxx/demo ProxyPassReverse/demo http://192.168.0.xxx/demo Now the problem is that while everything works fine when we access the site using http://192.168.0.xxx/demo, but the login fails when we access it using http://abc.xyz.com:0/demo. Tried all the three available session management options (php, cake, database) but nothing seems to work. Does, anyone has a solution ? Thanks for your help. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Shared code in models
Is there an easy way to share code in models. I have some common code that most of my models use. I like to have a single file with that code. How can I do that? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
knowledge base component
Does anyone know of a knowledge base / wiki component for Cake? It's not an easy thing to search for on Google. --~--~-~--~~~---~--~~ 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: Free Cake Ebook : How to build your own blog from scratch
@ JAmesF Sources have sources. It's a tree thing. Wikipedia was my source. Researchers and their studies/articles/whatever are, according to your argument, not sources as they cite information gathered from another source. It goes on. source: a person, book, or document that provides information or evidence. (source: OED) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Change default start opage with cakephp
On 8/3/2009 4:21 PM, Abraham Boray wrote: Exactly what I needed ,but in this case I'm not dealing with Apache Server , I want to achieve that with CakePHP core !! It may be there some function or trick to perform in order to make INDEX.HTML my startup page =) Custom route perhaps? Router::connect('/index.html', array('controller' = 'your_controller_here', 'action' = 'your action')); More detailed info about what you're trying to do would be nice too :-) --~--~-~--~~~---~--~~ 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: Shared code in models
On 8/3/2009 3:13 PM, ge...@dinnerbooking.com wrote: Is there an easy way to share code in models. I have some common code that most of my models use. I like to have a single file with that code. How can I do that? Place it in your app_model, all model classes extend it. --~--~-~--~~~---~--~~ 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: Problem handling search form fior multiple values
If you print out the contents of the $this-data array ( debug($this- data) ). You should see: [vendor_id] = Array ( [0] = 1 [1] = 2 ) So that's where you access those values, they are in the array. On Jul 27, 3:31 pm, NIghtmare327 pmills...@gmail.com wrote: I have a form I am using to do searches, and am having issues with the return values from the form. here is the code segment from the form: = index.ctp = ?php echo $form-button('Reset Form', array ('type'='reset', 'style'='width:200px;height:35px')); echo $form-input('Search.keywords'); echo $form-input('Search.name',array('after'=__ ('wildcard is *',true))); //echo $form-input('Search.vendor_id'); echo $form-input('Search.vendor_id', array('type' = 'select', 'multiple'=true)); echo $form-submit('Search'); ? It shows me themultiplelist, but when I print the passed values in the controller, this is what I get: Array ( [Search.vendor_id] = Array ) It appears I am getting the word Array back rather than the values of the selected items. Any thoughts on this matter? let me know if you need to see more of the source to see what is happening. Just as some background, Vendors is a lookup table for vendors based on vendor_id obviously. I want to be able to do a search based uponmultiplevendors rather than just 1. I have the search for one working, just not this one. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Contain conditions
That couldn't be set in the class variable but you could add it into the array within the action. public $paginate = array( 'Post' = array( ... ) ); public function function index() { $this-paginate['Post']['contain'] = array( ... ); } Having said that, it doesn't seem to me that what you want to do requires Containable. Instead, you need only adjust the conditions. public function function index() { /* get the list of Post IDs that this User has bookmarked */ $post_ids = ... $this-paginate['Post']['conditions'] = array( 'NOT' = array( 'Post.id' = $post_ids ) ); ... } On Sun, Aug 2, 2009 at 11:05 PM, Dave Maharaj :: WidePixels.comd...@widepixels.com wrote: Just wondering if this is possible or how to go about it Site has Posts from various users Now a User can bookmark posts they like and save them, now when they view the posts/index page how can i set pagination to contain so that it does not shows posts that the user has saved. Dave --~--~-~--~~~---~--~~ 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: router and pagination urls
In order to create a proper link with HtmlHelper, you'd need to do: echo $html-link( 'whatever', array( 'controller' = 'posts', 'action' = 'category_view', 'username' = $user_name, 'categoryslug' = $category_slug ) ); So, for PaginatorHelper, you need to pass both username categoryslug. Are they present in $this-passedArgs on the first page? Try debugging that. Also, you could drop the word 'category' from the URL by doing: Router::connect( '/blog/:username/:categoryslug', array('controller' = 'posts', 'action' = 'category_view'), array( 'pass' = array('username', 'categoryslug'), 'username' = '[0-9a-zA-Z]+', 'categoryslug' = '[a-z0-9]+' ) ); Do your category slugs not have dashes or underscores, btw? On Sun, Aug 2, 2009 at 6:38 PM, b1065...@tyldd.comb1065...@tyldd.com wrote: hi there, i am building blog platform where users can have blogs with cakephp. i have Posts controller. i have defined following route: Router::connect( '/blog/:username/category/:categoryslug', array('controller' = 'posts', 'action' = 'category_view'), array( 'pass' = array('username', 'categoryslug'), 'username' = '[0-9a-zA-Z]+', 'categoryslug' = '[a-z0-9]+' ) ); also inside category_view.ctp view file i have above at the begining: $paginator-options( array('url' = $this-passedArgs )); unfortunatelly my pagination links look like following: http://www.sample.com/posts/category_view/ADMIn/php/page:2 instead of: http://www.sample.com/blog/ADMIn/category/php/page:2 any ideas what could be wrong --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: A Search Behavior
I commented that out for now ($Terms), so it's all fine except that I use $persistentModel and it isn't working with searchable behavior: Fatal error: Class 'Zend_Search_Lucene' not found in ...searchable.php on line 147 On Aug 2, 12:29 am, rodd rodrigo.z...@gmail.com wrote: I have the same problem. Please can someone help? :) [2] 'Undefined variable: Hits [APP\models\behaviors\searchable.php, line 213]' 'Undefined variable: Hits [APP\models\behaviors\searchable.php, line 215]' Any updates pola, iTodd? The code differs a bit in thechaw (http://thechaw.com/cakebook/source/ plugins/searchable) vs the behavior @ assembla.com (http://www.assembla.com/wiki/show/searchable_behavior) Anyway, I'll try to find out what's wrong and if I do I'll post an update. Thanks On Jul 27, 11:43 pm, iTodd tol...@gmail.com wrote: I have the same problem. Please can someone help? :) Thanx for cakephp! On 22 jul, 09:31, pola goo...@artfolio.de wrote: Hi guys... I´am struggling to get that lucene thing implemented. I read the instructions athttp://www.assembla.com/wiki/show/dF-Zfqzzur3yBfab7jnrAJ It looks like i can build the search_index: p...@tomahawk:~/stuff/werkbank/cake_1.2.3.8166/cake/console$ ./cakesearchbuild_index -app /home/pola/stuff/werkbank/emmall/generator/ trunk/output/ Notice: Hex number is too big: 0x1 in /home/pola/stuff/ werkbank/emmall/generator/trunk/output/vendors/Zend/Search/Lucene/ Storage/File.php on line 268 Notice: Hex number is too big: 0x1 in /home/pola/stuff/ werkbank/emmall/generator/trunk/output/vendors/Zend/Search/Lucene/ Storage/File.php on line 289 Notice: Hex number is too big: 0x1 in /home/pola/stuff/ werkbank/emmall/generator/trunk/output/vendors/Zend/Search/Lucene/ Storage/File.php on line 290 Notice: Hex number is too big: 0x1 in /home/pola/stuff/ werkbank/emmall/generator/trunk/output/vendors/Zend/Search/Lucene/ Storage/File/Memory.php on line 380 Notice: Hex number is too big: 0x1 in /home/pola/stuff/ werkbank/emmall/generator/trunk/output/vendors/Zend/Search/Lucene/ Storage/File/Memory.php on line 401 Notice: Hex number is too big: 0x1 in /home/pola/stuff/ werkbank/emmall/generator/trunk/output/vendors/Zend/Search/Lucene/ Storage/File/Memory.php on line 402 8.3 Processing Category #16 Processed Category #16 16.7 ... ... ... Processing Category #28 Processed Category #28 100.0 Processing Category #29 Processed Category #29 Optimizing index... Optimized index. and the results in the dirs: @cake p...@tomahawk:~/stuff/werkbank/cake_1.2.3.8166/cake/console$ ls search_index/ optimization.lock.file _q.cfs read.lock.file read-lock- processing.lock.file segments_17 segments.gen write.lock.file @app p...@tomahawk:~/stuff/werkbank/emmall/generator/trunk/output/tmp$ ls search_index/ read.lock.file segments_1 segments.gen write.lock.file But if i use the newest lucene stuff from zend i get notices like u see allthough above Hex number is too big: 0x1 [APP/vendors/Zend/Search/Lucene/ Storage/File.php, line 268]. If i use the lucene source fromhttp://thechaw.com/cakebook/itsfine i dont get that notices. The Warning i allways get is Undefined variable: Hits [APP/plugins/searchable/models/behaviors/ searchable.php, line 213] Anyways i dont get any results out of thatsearchfunction. $this-Model-search($query, $limit, $page) $this-Model-hits_count() $this-Model-terms(); I reckon i just missed to adjust some tiny noob stuff!? Any Ideas or recommendations would be very helpful... Thanx a lot for cakephp. It's already implemented being used on the cookbook as a plugin: http://thechaw.com/cakebook/source/plugins/searchable It uses Lucene the adapter from ZendFramework, and works well enough. -j. --~--~-~--~~~---~--~~ 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: Using Ajax to dynamically update a select box
I found the solution. In the controller: Instead of rendering the external update_select.ctp view, I simply used --- $this-autoRender = false; once this line is set, I could then just echo directly into my view from my update_select function. --~--~-~--~~~---~--~~ 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: saveAll() with $fieldList problem
Hi jakobjp, I have exact the same problem. Did you found a solution? On 13 Jul., 11:50, jakobjp m...@jakobjp.net wrote: Hi Joshua. Thanks for your response, but unfortunately you misunderstood the issue. I am NOT asking for the format of the $data array, but the $fieldList (an option that can be passed on to thesaveAll() function). According to the CakePHP docs (your link): If $fieldListis not supplied, a malicious user can add additional fields to the form data, and by this change fields that were not originally intended to be changed. Now, passing an Array like below to $this-User-save($data, $fieldList) is fine: $fieldList= array( 'first_name', 'last_name', ); QUESTION: How aboutsaveAll() with multiple Models (like in my example in the first post)? How should the $fieldListarray look? On Jul 13, 4:50 am, joshua josh...@gmail.com wrote: Take a look at the chapter ' 3.7.4 Saving Your Datahttp://book.cakephp.org/view/75/Saving-Your-Data#Saving-Related-Model...' in cakebook. Array ( [Article] = Array ( [title] = My first article ) [Comment] = Array ( [0] = Array ( [comment] = Comment 1 [user_id] = 1 ) [1] = Array ( [comment] = Comment 2 [user_id] = 2 ) ) ) $this-Article-saveAll($data); On Mon, Jul 13, 2009 at 4:34 AM, jakobjp m...@jakobjp.net wrote: I cannot get the $fieldListto work for Model-saveAll() not matter what I try. How should the $fieldListarray be formatted when storing a Model plus associated Models viasaveAll()? My example: Form fields: User.first_name User.last_name Address.street Address.city ... The two models User and Adresse are associated with the User hasOne Address. -- Thanks Joshua 5span Inc. https://www.5span.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: ACL not denying access to protected actions
Show your code where you check permissions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: possible to do validation in not current model? where should I put validation??
thanks brian. Is possible to pass specific value to validation at model(Size model in this case) I want to create custom validation but I need to pass value to do it. (in this case, category_id) thanks, leafchild On Aug 2, 8:49 am, brian bally.z...@gmail.com wrote: Try this: $this-Product-Size-set($this-data); if ($this-Product-Size-validates()) { ... On Fri, Jul 31, 2009 at 3:12 PM,leafchildleafchild.b...@gmail.com wrote: For example There are 3 tables categories, products and sizes, and I'm working on product page (product.php, products_controller.php, product.ctp). The database looks like this. sizes: --- | id | --- | category_id | | size_name | -- products: --- | id | --- | sku | | category_id | | product_name | | size_id | categories: --- | id | --- | category_name | --- Product page can add/edit product: Before I save new product the page also can add new size. I can verify a product data such as sku value from the model but I want to also make sure, user can add new size name if it's not exist in the system(not exist in size table). I want to put validation code in model. Should I put validation code in size.php or product.php Also if I want validate this then I have to pass category also. (same size name can be exist if it has different category id) How can I pass specific value to model so I can set vilification in mode and not controller? Or in this case I should just put code in controller? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Containable - Deep Associations - Sort resulting array
I would like a select menu filled with clients sorted by advancement category. Here are the models Client belongsTo Family Family belongsTo Advancement (i.e. status) Advancement belongsTo AdvancementCategory. My code: function clientList() { return $this-Client-find('all', array( 'fields' = array( 'id', 'firstname', 'lastname', 'family_id'), 'contain' = array( 'Family' = array( 'fields' =array( 'id', 'advancement_id'), 'Advancement' = array( 'fields' =array( 'id', 'advancement_category_id'), 'AdvancementCategory' = array( 'fields' = array( 'id', 'name') )); } Again, I would like the resulting array to be sorted by AdvancementCategory.id. How do I do that? --~--~-~--~~~---~--~~ 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: Internal error always
Yeah I am. Besides that does anyone know the reasoning behind it? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
is there a workaround for using sql server function getdate()?
Hi, I'm using Sql Server as my database and have some fields with datetime data types and default values to call the getdate function. I know this causes an error because the sql generated is: Query: INSERT INTO [groups] ([created], [modified], [name]) VALUES ('getdate(', 'getdate(', 'administrators') As you can see the parser doesn't know what to do with the getdate function. Is there a workaround for this or should I just handle the datetime fields manually? Thanks, Jason --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
how to change where aros is saved?
Hi, people, i have two schemas, calle A and B, inside my bd (i use postgres), and two different projects, each one working with one schema. In one project, my config database default is with schema A, I want to save the data inside aros, but that table is in schema B. How can i do this? Please, i wont put aros inside schema A, i have my reasons. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: how to change where aros is saved?
Below what i've done $connection = ConnectionManager::create('acl',$this-config); $aroNode = ClassRegistry::init('Aro'); $aroNode-setDataSource('acl'); I've created one datasource at runtime with database and schema that i want to work, and i created AroModel and modify its datasource. But, when the entry is saved, it doesn't work. SQL created by cake is the following: INSERT INTO aros (parent_id, model, foreign_key, lft, rght) VALUES (DEFAULT, 'Group', '9', '1', '2') In any moment schemas' name is used. How could cake to know where to save? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Release: 1.2.4 and 1.3-dev
The CakePHP development team is happy to announce the release of two new versions. Firstly, CakePHP 1.2.4[1] is a bug fix release of the latest stable branch. Check the changelog[2] for all the changes. Also, we have made CakePHP 1.3.0-dev[3] available for download. CakePHP 1.2 includes more than 100 commits along with over 70 bug fixes. CakePHP 1.3 dev includes many new enhancements and some optimizations. The most notable changes include - compatibility changes have been added for PHP 5.3. - new Javascript Helper including support for multiple js libraries - improved bake code generation with better support for plugins and templates Checkout the 1.3 changelog[4], 1.3 migration guide[5] and 1.3 hit list for some more ideas. As well as these changes to the code, we have some other changes to the project. - We completed our move to git and opened up http://code.cakephp.org, which uses the latest version of 1.3, as the new home for all developments related to CakePHP. The old development site at trac.cakephp.org will continue to exist for legacy purposes, however, you will not be able to create new tickets. If you have any new issues on 1.2 or find problems with 1.3, please goto http://code.cakephp.org/tickets. - With the move to git, you will see lots of branches and might wonder which ones to use. - master: latest stable, 1.2.4.8284 - 1.2: development branch for bug fixes - 1.3: development branch for new features There are several other branches, but those are for specific feature development and may not be stable. Feel free to fork the project and work on code as you need it. We can pull changes in from your fork and we have actually already done this a few times. - We have some changes to the CakePHP job board, located at http://cakephp.org/jobs. We received this message from EliteOpenSourceJobs. We'd like to thank everyone who has posted jobs on or visited our job board. After many months of having our boards up on several communities (including Cake) and with a great a deal of feedback from communities, we have decided to make the job board free to post. We think this will be much better for everyone, as there will be more postings for developers, and will make it even more apparent that there are real opportunities for those who know Cake. We hope everyone will visit cakephp.org/jobs frequently in the near future, as there are more opportunities than ever on the board. We also hope that if you are looking for developers, you will consider the Cake board first. You can also support the community by posting a job widget on your site. This will help companies who want to find use Cake find great developers fast. Just sign up at: http://eliteopensourcejobs.com/affiliates/register and we'll get you a snippet right away. It takes less than a minute to sign up. [1]http://cakeforge.org/frs/?group_id=23release_id=447 [2]https://trac.cakephp.org/wiki/changelog/1.2.x.x [3]http://cakeforge.org/frs/?group_id=23release_id=448 [4]http://code.cakephp.org/wiki/1.3/changelog [5]http://code.cakephp.org/wiki/1.3/migration-guide [6]http://code.cakephp.org/wiki/1.3/Hit_List --~--~-~--~~~---~--~~ 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: De-sanitize for Text Boxes
I didn't set the encoding for UTF8. Should I? Are there any other encoding related specifications I should follow? Thanks. On Aug 2, 1:41 am, euromark (munich) dereurom...@googlemail.com wrote: just dont sanitize them in the first place the problem must be caused by something else usually cake escapes them automatically is everything UTF-8? especially the db? (careful: utf8 not uft-8 here!) On 2 Aug., 03:34, Ponch316 ponch...@gmail.com wrote: Hi, I'm new to CakePHP and I came across a little problem. I created a scaffold to upload a list of schools to my database and after uploading about 400, I noticed that some of the schools were disappearing both from the scaffold view and the database. Since no one else has access to my system, I realized that the only possible reason for that is that some characters I entered, like apostrophes ('), hyphens (-), and commas (,), caused trouble in the database somehow. I created a new scaffold using Bake and decided use Sanitize::clean() before saving. So far, schools are no longer disappearing, but when I try to edit one of these, the characters are NOT displayed correctly in the text boxes (e.g: O#039;Malley). I tried using the PHP method htmlspecialchars_decode() (http://us.php.net/htmlspecialchars_decode) before sending $this-data to the view but it didn't work, characters are still showing up like that. I was wondering if someone could help me to solve this problem. I don't know if I'm doing something wrong, cuz I'm very surprised that Cake has problems handling special characters, since a lot of last names use apostrophes. If you think I should use a different approach, please let me know as well. Thanks in advance. Ponch316 --~--~-~--~~~---~--~~ 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: shuffle(), rand(), etc always returning same number
Also ive tried setting srand() manually, and my /dev/random and /dev/ urandom folders exist. On Aug 3, 3:25 pm, Miles J mileswjohn...@gmail.com wrote: I found this very weird bug today, and I am extremely stumped on the problem. I was working on a static ad system. The ads are listed in an array and I would shuffle() the array and then output the first index as the current ad for that request. It works fine locally but online it does not. So then I tried using rand(), same problem. I also noticed on the homepagehttp://www.gamesync.com/the Action, RPG, etc tabs are always on the same tab, but should also be randomizing with rand(), yet are not. But they work locally. I really have no idea why the randomizing functions work locally but not online. Is there some sort of setting or hidden cache function I don't know about, can anyone enlighten me? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
shuffle(), rand(), etc always returning same number
I found this very weird bug today, and I am extremely stumped on the problem. I was working on a static ad system. The ads are listed in an array and I would shuffle() the array and then output the first index as the current ad for that request. It works fine locally but online it does not. So then I tried using rand(), same problem. I also noticed on the homepage http://www.gamesync.com/ the Action, RPG, etc tabs are always on the same tab, but should also be randomizing with rand(), yet are not. But they work locally. I really have no idea why the randomizing functions work locally but not online. Is there some sort of setting or hidden cache function I don't know about, can anyone enlighten me? --~--~-~--~~~---~--~~ 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: is there a workaround for using sql server function getdate()?
Use the NOW() function, or do it manually in php. date('Y-m-d H:i:s') --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
mysql crashes on acl-allow()
Hi all, I started my community website without acl. Now its time to have acl as I want to have moderators for some parts of the website. I wrote a little controller, that assists me in putting all the aros and acos in the db. In order for it to work i had to set the max execution time in php.ini to a high value. Now the script runs for almost 5 minutes, but finally all 1000+ aros and all 8000+ acos are created. I have the following aros Superadmin -User::1234 // (thats me :-) ) Admin -User::1 -User::2 - ... and this acos User -User::1 -User::2 -... Post -Post::1 -Post::2 -... etc. (I have alltogether 10 aco groups with at least 500 children each) I've already checked that there are no double alias entries! Now when I try to set the first acl permissions mysql crashes. $this-Acl-allow('Superadmin','User','read'); -- crash I want to give aro group with alias Superadmin read access to aco group with alias User Same happens, when I put Post instead of User as aco group alias I also tried: $this-Acl-allow('Superadmin','User',array('read')); $this-Acl-allow('Superadmin','User',array('delete')); $this-Acl-allow('Superadmin','User',array('read','delete')); $this-Acl-allow('Superadmin','User','delete'); mysql uses 50% of my cpu (it's a dual core, so it uses 100% of one core) and keeps allocating memory. So it's actually not really crashing, but something goes terribly wrong. Any ideas? Thanks Laura --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CakePHP Auth Redirect
I currently have an element that sits on the side of all my pages. It has the login form. I want to know, how can I stop CakePHP from redirecting the user to /users/login (default) when the login fails and they putting up the flash message there saying, you failed the login. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Retrieve data from $this-Auth-User in Model?
Hey, for a little validation-function in my model I need to get the data from the logged-in user, which is stored in $this-Auth-User ('fieldname'). This works in my controller, is there any chance to get this data directly into the model without retrieving the data in the controller and then passing it into the model? THX in advance... --~--~-~--~~~---~--~~ 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: Internal error always
On 8/3/2009 11:15 PM, Miles J wrote: Yeah I am. Besides that does anyone know the reasoning behind it? When I had these issues tech support always said 'heavy load'. Please note that I'm only relaying my case here... this may not apply to you. --~--~-~--~~~---~--~~ 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: AuthComponent logs out users randomly?
[CODE]function __initSession() { $iniSet = function_exists('ini_set'); if ($iniSet env('HTTPS')) { ini_set('session.cookie_secure', 1); } switch ($this-security) { case 'high': $this-cookieLifeTime = 0; if ($iniSet) { ini_set('session.referer_check', $this-host); } break; case 'medium': $this-cookieLifeTime = 7 * 86400; if ($iniSet) { ini_set('session.referer_check', $this-host); } break; case 'low': default: $this-cookieLifeTime = 78894; break; } [/CODE] Give a look at the source file. You can set the Security.level to 'low' to get a long cookieLifeTime. Do not make a redirect from other sites('session.referer_check') to your site, or your session will lost too if you set 'medium' or 'high'. On Mon, Aug 3, 2009 at 1:34 AM, Persivo Cunha ricky...@gmail.com wrote: Hi, try to modify your timeout, and keep Security,level in low. You must open core.php and modify the line Configure::write ('Session.timeout', '120'); Put 200, or what you want. You'll be logged 200 x 300 seconds. I don't know if it will work because I use 120 and low, and I can be connected for a very long time. On 1 ago, 14:51, Marcel vermas...@gmail.com wrote: Hi, I'm using cake's AuthComponent for login/logout etc. But sometimes when I click around the site I'm getting logged out. No error message - nothing. Rarely I've also seen white screens. But no error message on the screen (debug is enabled) and no errors in any log files (webserver+cake). I was not able to surely reproduce this, it just happens randomly. But I just got logged out by clicking very fast around the page. I think cake logs me out when I click to links at the same time (i.e. click one link and fastly any other link before the site loads). This is really annoying :( Security.level is set to high, but it also happens at low. I'm not using any ACL stuff. Maybe someone has any tip? Marcel -- Thanks Joshua 5span.com https://www.5span.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: De-sanitize for Text Boxes
there are many reason for it, and almost none against it so yes, i would advice you to do so sanitizing is not neccessary if you make sure all your view outputs are specialchared with h() like echo h($data[Model][title]); html-helper functions like §html-link() do that for you right away anyway this way you wont run in any of your current problems mark On 4 Aug., 01:07, Ponch316 ponch...@gmail.com wrote: I didn't set the encoding for UTF8. Should I? Are there any other encoding related specifications I should follow? Thanks. On Aug 2, 1:41 am, euromark (munich) dereurom...@googlemail.com wrote: just dont sanitize them in the first place the problem must be caused by something else usually cake escapes them automatically is everything UTF-8? especially the db? (careful: utf8 not uft-8 here!) On 2 Aug., 03:34, Ponch316 ponch...@gmail.com wrote: Hi, I'm new to CakePHP and I came across a little problem. I created a scaffold to upload a list of schools to my database and after uploading about 400, I noticed that some of the schools were disappearing both from the scaffold view and the database. Since no one else has access to my system, I realized that the only possible reason for that is that some characters I entered, like apostrophes ('), hyphens (-), and commas (,), caused trouble in the database somehow. I created a new scaffold using Bake and decided use Sanitize::clean() before saving. So far, schools are no longer disappearing, but when I try to edit one of these, the characters are NOT displayed correctly in the text boxes (e.g: O#039;Malley). I tried using the PHP method htmlspecialchars_decode() (http://us.php.net/htmlspecialchars_decode) before sending $this-data to the view but it didn't work, characters are still showing up like that. I was wondering if someone could help me to solve this problem. I don't know if I'm doing something wrong, cuz I'm very surprised that Cake has problems handling special characters, since a lot of last names use apostrophes. If you think I should use a different approach, please let me know as well. Thanks in advance. Ponch316 --~--~-~--~~~---~--~~ 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: Release: 1.2.4 and 1.3-dev
https://trac.cakephp.org/wiki/changelog/1.2.x.x getting a error trying to load this page Secure Connection Failed trac.cakephp.org uses an invalid security certificate. The certificate expired on 8/3/2009 12:05. (Error code: sec_error_expired_certificate) On Aug 3, 6:58 pm, Gwoo gwoo.cake...@gmail.com wrote: The CakePHP development team is happy to announce the release of two new versions. Firstly, CakePHP 1.2.4[1] is a bug fix release of the latest stable branch. Check the changelog[2] for all the changes. Also, we have made CakePHP 1.3.0-dev[3] available for download. CakePHP 1.2 includes more than 100 commits along with over 70 bug fixes. CakePHP 1.3 dev includes many new enhancements and some optimizations. The most notable changes include - compatibility changes have been added for PHP 5.3. - new Javascript Helper including support for multiple js libraries - improved bake code generation with better support for plugins and templates Checkout the 1.3 changelog[4], 1.3 migration guide[5] and 1.3 hit list for some more ideas. As well as these changes to the code, we have some other changes to the project. - We completed our move to git and opened uphttp://code.cakephp.org, which uses the latest version of 1.3, as the new home for all developments related to CakePHP. The old development site at trac.cakephp.org will continue to exist for legacy purposes, however, you will not be able to create new tickets. If you have any new issues on 1.2 or find problems with 1.3, please gotohttp://code.cakephp.org/tickets. - With the move to git, you will see lots of branches and might wonder which ones to use. - master: latest stable, 1.2.4.8284 - 1.2: development branch for bug fixes - 1.3: development branch for new features There are several other branches, but those are for specific feature development and may not be stable. Feel free to fork the project and work on code as you need it. We can pull changes in from your fork and we have actually already done this a few times. - We have some changes to the CakePHP job board, located athttp://cakephp.org/jobs. We received this message from EliteOpenSourceJobs. We'd like to thank everyone who has posted jobs on or visited our job board. After many months of having our boards up on several communities (including Cake) and with a great a deal of feedback from communities, we have decided to make the job board free to post. We think this will be much better for everyone, as there will be more postings for developers, and will make it even more apparent that there are real opportunities for those who know Cake. We hope everyone will visit cakephp.org/jobs frequently in the near future, as there are more opportunities than ever on the board. We also hope that if you are looking for developers, you will consider the Cake board first. You can also support the community by posting a job widget on your site. This will help companies who want to find use Cake find great developers fast. Just sign up at:http://eliteopensourcejobs.com/affiliates/register and we'll get you a snippet right away. It takes less than a minute to sign up. [1]http://cakeforge.org/frs/?group_id=23release_id=447 [2]https://trac.cakephp.org/wiki/changelog/1.2.x.x [3]http://cakeforge.org/frs/?group_id=23release_id=448 [4]http://code.cakephp.org/wiki/1.3/changelog [5]http://code.cakephp.org/wiki/1.3/migration-guide [6]http://code.cakephp.org/wiki/1.3/Hit_List --~--~-~--~~~---~--~~ 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: Containable - Deep Associations - Sort resulting array
function clientList() { return $this-Client-find('all', array( 'fields' = array( 'id', 'firstname', 'lastname', 'family_id'), 'contain' = array( 'Family' = array( 'fields' =array( 'id', 'advancement_id'), 'Advancement' = array( 'fields' =array( 'id', 'advancement_category_id'), 'AdvancementCategory' = array( 'fields' = array( 'id', 'name') 'order'=array('AdvancementCategory.id ASC'), )); } On Aug 3, 4:42 pm, pomares k...@gordonpomarescentre.com wrote: I would like a select menu filled with clients sorted by advancement category. Here are the models Client belongsTo Family Family belongsTo Advancement (i.e. status) Advancement belongsTo AdvancementCategory. My code: function clientList() { return $this-Client-find('all', array( 'fields' = array( 'id', 'firstname', 'lastname', 'family_id'), 'contain' = array( 'Family' = array( 'fields' =array( 'id', 'advancement_id'), 'Advancement' = array( 'fields' =array( 'id', 'advancement_category_id'), 'AdvancementCategory' = array( 'fields' = array( 'id', 'name') )); } Again, I would like the resulting array to be sorted by AdvancementCategory.id. How do I do that? --~--~-~--~~~---~--~~ 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: Containable - Deep Associations - Sort resulting array
On Aug 3, 4:42 pm, pomares k...@gordonpomarescentre.com wrote: I would like a select menu filled with clients sorted by advancement category. Here are the models Client belongsTo Family add an order field to your find array, not in any of the contain sub- arrays. ie 'order'='AdvancementCategory.id ASC' you also add order fields within your 'contain' sub arrays to sort that subset within your larger dataset Family belongsTo Advancement (i.e. status) Advancement belongsTo AdvancementCategory. My code: function clientList() { return $this-Client-find('all', array( 'fields' = array( 'id', 'firstname', 'lastname', 'family_id'), 'contain' = array( 'Family' = array( 'fields' =array( 'id', 'advancement_id'), 'Advancement' = array( 'fields' =array( 'id', 'advancement_category_id'), 'AdvancementCategory' = array( 'fields' = array( 'id', 'name') )); } Again, I would like the resulting array to be sorted by AdvancementCategory.id. How do I do that? --~--~-~--~~~---~--~~ 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: shuffle(), rand(), etc always returning same number
you could always curl http://www.random.org/ and extract the results from their random number generator. all kidding aside, what are you feeding to srand()? what does 3x echo rand() give you if you dont seed it? whats does it give you after you seed it? just trying to name off a few things to get yer mind kicking. good luck and report back On Aug 3, 7:10 pm, Miles J mileswjohn...@gmail.com wrote: Also ive tried setting srand() manually, and my /dev/random and /dev/ urandom folders exist. On Aug 3, 3:25 pm, Miles J mileswjohn...@gmail.com wrote: I found this very weird bug today, and I am extremely stumped on the problem. I was working on a static ad system. The ads are listed in an array and I would shuffle() the array and then output the first index as the current ad for that request. It works fine locally but online it does not. So then I tried using rand(), same problem. I also noticed on the homepagehttp://www.gamesync.com/theAction, RPG, etc tabs are always on the same tab, but should also be randomizing with rand(), yet are not. But they work locally. I really have no idea why the randomizing functions work locally but not online. Is there some sort of setting or hidden cache function I don't know about, can anyone enlighten me? --~--~-~--~~~---~--~~ 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: Urgent help needed
var $validate = array( 'fldCompanyName' = VALID_NOT_EMPTY, 'fldContactPerson' = VALID_EMAIL, 'fldAddress' = VALID_NUMBER ); the validate array in your model looks suspect. try using the validation rules on this page: http://book.cakephp.org/view/134/Core-Validation-Rules On Aug 2, 1:18 pm, Rahul rahul...@gmail.com wrote: Hello Guys, I am new with cake php and I am building a Invpoice Manager for one of my cleint . I am stuck with data valdation an need your help to figure out the error , data validation is not working . Plerase find all the code below: Controller ?php class AdminsController extends AppController { var $name = 'Admins'; var $uses = array('Admin','User_role'); function index() { $this-set('admins', $this-Admin-find('all')); } function user_register() { if($this-Session-check('USER') == false) { $this-flash('Your session has been expired, please login to continue.','/'); return; } if (!empty($this-data)) { if ($this-Admin-save($this-data)) { $this-Session-setFlash('Your post has been saved.'); $this-redirect(array('action' = 'success')); } else { $this-set('data', $this-data); $this-validateErrors($this-data); $this-render(); } } } function user_role() { if($this-Session-check('USER') == false) { $this-flash('Your session has been expired, please login to continue.','/'); return; } // get the list of all users for which there is no role data in db $user_id = $_SESSION['USER']; $allNewCompanies = $this-Admin-__get_users_norole($user_id); $this-set('user_norole_list' , $allNewCompanies); } function assign_role($id) { $this-set(company_id,$id); // form posted now handle data and save to db if( isset($_POST['submit']) || isset($this-data) ) { /* if($this-User_role-validate()) { $this-Admin-__assign_user_role($this-data-rdAssignRole,$this-data-company_id); } else { $errors = $this-User_role-invalidFields(); $this-Session-setFlash(implode('br', $errors)); } */ if(!empty($_POST['role_id'])) { $this-Admin-__assign_user_role($_POST['company_id'],$_POST ['role_id']); $this-Session-setFlash('Role has been successfully assigned.'); $this-redirect(array('action' = 'success')); } } } function success() { if($this-Session-check('USER') == false) { $this-flash('Your session has been expired, please login to continue.','/'); return; } } } ? model ?php class Admin extends AppModel { var $name = 'Admin'; var $useTable = false; var $validate = array( 'fldCompanyName' = VALID_NOT_EMPTY, 'fldContactPerson' = VALID_EMAIL, 'fldAddress' = VALID_NUMBER ); // This is where the magic happens function schema() { return array ( 'fldCompanyName' = array('type' = 'string', 'length' = 60), 'fldContactPerson' = array('type' = 'string', 'length' = 60), 'fldAddress' = array('type' = 'text', 'length' = 100), 'fldPhone' = array('type' = 'string', 'length' = 8), 'fldMobile' = array('type' = 'string', 'length' = 10), 'fldFax' = array('type' = 'string', 'length' = 8), 'fldCSTNo' = array('type' = 'string', 'length' = 8), 'fldTINNo' = array('type' = 'string', 'length' = 8), 'fldRemarks' = array('type' = 'string', 'length' = 8),
Re: Fatal error: Maximum execution time of 30 seconds exceeded
set execution time in php ini. i wouldnt use max execution at -1 (infinite) and your host might have some hard limits. mine is 1 seconds because i would like scripts to eventually terminate. On Aug 2, 5:20 am, arif hossen arifhossen2...@gmail.com wrote: -- Dear All, Please help me , How i can solve below this problem in cakephp ,I want to unlimited execution time. *Fatal error*: Maximum execution time of 30 seconds exceeded in * D:\wamp\www\auctionsite\cake\libs\folder.php* on line *445* Regards, Mohammad Arif Hossen Web Developer United Group International(UGIBD)www.ugibd.net Mobile no: +88 01714355911 Mobile no: +88 01922110308 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
User editing another user
I'm back to using CakePHP, this time for a real work project. I'm having trouble wrapping my brain around something. My application is using auth/acl set up as Mark Story has suggested: http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-2 So, I've got this all working. Now for my app, the users can belong to one of the following groups I've set up: students, teacher, principals, administrators. I'll just start with the first level. Teachers need to have access to CRUD students. This is different from Mark's tutorial. The item being edited isn't something like a blog post. Its an actual user. (So, user from one group editing user from another group.) I don't think I need to actually create a student model do I? A student is really just a user that belongs to the students group. So, I know I do need a students controller. How do I set this up? I'm thinking I need to use the $uses variable, but beyond that I'm a little lost as to where to go. Should my students controller just extend the users controller? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Error baking using 1.3 dev
Hi, So glad to see new shiny release for 1.3. I tried to use this new release to cake bake But I got error, first the error is class I18n not found then I added manually the path in console/cake.php : The code I added: CORE_PATH . 'cake' . DS . 'libs'. DS . 'i18n.php', CORE_PATH . 'cake' . DS . 'libs'. DS . 'l10n.php' But then I still found error, Is this 1.3 dev release not ready to bake? The error like this: D:\MyWorks\Projects\source created D:\MyWorks\Projects\source\views created D:\MyWorks\Projects\source\views\pages created D:\MyWorks\Projects\developert\views\pages\home.ctp copied to D:\MyWorks\Project s\source\views\pages\home.ctp PHP Warning: include(D:\Master\PHP\cake13\D:\Master\PHP\cake13\cake\console\tem plates\default\views\home.ctp): failed to open stream: Invalid argument in D:\Ma ster\PHP\cake13\cake\console\libs\tasks\project.php on line 187 Warning: include(D:\Master\PHP\cake13\D:\Master\PHP\cake13\cake\console\template s\default\views\home.ctp): failed to open stream: Invalid argument in D:\Master\ PHP\cake13\cake\console\libs\tasks\project.php on line 187 PHP Warning: include(): Failed opening 'D:\Master\PHP\cake13\D:\Master\PHP\cake 13\cake\console\templates\default\views\home.ctp' for inclusion (include_path='. ;C:\php5\pear') in D:\Master\PHP\cake13\cake\console\libs\tasks\project.php on l ine 187 Warning: include(): Failed opening 'D:\Master\PHP\cake13\D:\Master\PHP\cake13\ca ke\console\templates\default\views\home.ctp' for inclusion (include_path='.;C:\p hp5\pear') in D:\Master\PHP\cake13\cake\console\libs\tasks\project.php on line 1 87 PHP Notice: Undefined variable: output in D:\Master\PHP\cake13\cake\console\lib s\tasks\project.php on line 188 Notice: Undefined variable: output in D:\Master\PHP\cake13\cake\console\libs\tas ks\project.php on line 188 -- Best regards, Isak Rickyanto, ST GrailsDeveloper.com Diskusiweb.com - Indonesian IT Community --~--~-~--~~~---~--~~ 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: Check boxes for a noob
Is this line 12? form method=post action=?php echo $html-url('/admin/users/edit/'.$this-data['User']['id']); ? If yes, then check that you are providing a valid user id! The error message clearly states that line 12 is in error, and that the 'id' is not a known index in some array! Therefore, is the above line 12? The rest is up to you, enjoy, John On Aug 2, 1:46 pm, Michael Gaiser mjgai...@gmail.com wrote: So I am trying to get these check boxes to populate correctly and save to the DB. (The Select window is too prone to messing things up). Any ideas why the check boxes arnt bring checked properly? Also when I change it to just a normal select list ('multiple'='true') I still get this: *Notice* (8): Undefined index: id [*APP\views\users\admin_edit.ctp*, line *12*] I would be grateful for any help. ~Michael [snip] The View: h2Edit User Record (Admin Mode)/h2 form method=post action=?php echo $html-url('/admin/users/edit/'.$this-data['User']['id']); ? ?php echo $form-hidden('User.id'); ? ?php echo $form-label('User.username'); ? ?php echo $form-error('User.username'); ? ?php echo $form-text('User.username', array('size' = '80' ) ); ? ?php echo $form-label('User.Group', 'User Group (listed according to access rights)' ); ? ?php echo $form-error('User.Group', 'You must select a user group'); ? [snip] ?php echo $form-submit('Save Changes'); ? /form --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---