Re: Infinite redirect when logout with AuthComponent
I see... I checked the api and there all build in components are extended from Object instead of Component. So changing the inheritence does make sence indeed. But why the existence of class Component I wonder? :-) On 15 jun, 22:46, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello I'm having the same kind of problem. I think it happens when you have a component that extends Component the problem goes away when you have you components extend Object any one would comment on this ? TIA thomas On Jun 10, 4:41 pm, Marcelius [EMAIL PROTECTED] wrote: Hi Just upgraded to CakePHPRC1and after some minor fixes I found that I couldn't properly logout anymore. It caused the browser to continouslyredirectto the originating url. I found that the problem lies in the components used by my users controller: In UsersController: public function logout() { $this-Auth-logout(); $this-redirect(array(controller=users, action=login, plugin=nedcore)); } But instead of redirecting to /users/login the browser is redirected to which is the same as the original url, in my case /users/ logout. I have fixed this by adding the following method in all components used by the users controller: public function beforeRedirect(){ return null; } I don't know what the bug is exactly but I figured maybe someone else has the same problem... --~--~-~--~~~---~--~~ 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: How to change the argument separator for named params?
On Jun 16, 1:57 am, Matt Huggins [EMAIL PROTECTED] wrote: For giggles, I also tried the following in my app_controller.php, and it didn't make a difference: Anything you try in the app controller is too late. Edit that: https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/router.php?rev=7186#L93 By calling this: https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/router.php?rev=7186#L222 in your routes file. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
paginate group members
I use acl aro to handle group and member. I want to paginate the group member. var $paginate = array( 'Aro' = array( 'fields' = array('Aro.model', 'Aro.foreign_key') 'limit' = 3, 'order' = 'Aro.foreign_key') ); I wish to have paginate to show username, how to do that ? If I modify the fields as following: 'fields' = array('Aro.model', 'Aro.foreign_key', 'User.username) I get Unknown table 'User' in field list error. -- doctor --~--~-~--~~~---~--~~ 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: cant change document root on my hosting company
Shouldn't this be done in the .htaccess file? Check your settings and make sure apache has mod_rewrite enabled. Good luck Sean kroxelikrax wrote: Hi, Im new to cakePHP and i been constructing a page on my local computer, using MAMP. My site is working fine on my comp, but not on my website host. Im using one.com for hosting, and they dont allow me to change document root to app/webroot/. Ive tried a couple of solutions I found searching google but none worked.. how can I make my site work as i works on my local comp? sorry if this question allready have been asked but i tried to search and i came up with nothing.. This has been buggin me for the whole day... sorry for my english, im a swede=) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Upgrade Instructions ?
Hi, my cakephp installation is about 3 years old. Now I want to install the latest cakephp version to be sure that there are no security holes. Are there any upgade instructions ? Do I have to change the db table structure ? I have no VERSION.TXT in my installation, but my basic.php file says: Revision: 2477 Thanks for any hint. Andy --~--~-~--~~~---~--~~ 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: New server where strings get utf8 encoded before being saved to MySQL. Any hints for me?
Yeah, I got that the reason is linguistic in its origin. It is great when trying to search a mass of text. But when you try to do a matching search for an exact string it does complicate things a lot when you still think that = really means exactly equal. Doing WHERE username = 'myname' I (as a programmer) never ever want to match anything else but exactly that. Doing WHERE article LIKE '%cake%' I would not at all be this critical or surprised since it is a different kind of searching in my world. Also, I was under the mistaken impression that COLLATE was ONLY related to how to sort these special characters. This I have not problem with either btw. Previously, I had no idea that collation also affected simple matching searches. The equal sign has a special place in my heart. :) I guess the binary collation will be my preference for general data. Do you have any advice for a web-application with multiple languages? You can only take advantage of the linguistic advantages as long as the language in the data and the collation match. How would cater for, say, a blog in both german and french? Set the database defaults to general or binary and then add COLLATE utf8_french_ci to the queries? thanks Martin On Jun 13, 4:28 pm, Jonathan Snook [EMAIL PROTECTED] wrote: A am a bit shocked that it is a feature when å is the same as a in MySQL. That sounds just plain wrong to me. If it had been so for utf8_some_special_ci, fine, but not for general (the default default) collations. To me that would be like PHP saying (1 == 1.2) is true because it is close enough. :) Very strange but I guess they must have some very good reason for it. It's not really the same thing and yes, there's a very good reason. Most languages, diacritics are meant to alter the pronunciation of a letter. In other words, e, é and è are the same letter but have different pronunciations because of the accent marks. Therefore, when a French person does a search for a word, they might simply type in ecole but they fully expect école to show up. Another example, I live in a city known as Orléans but has been known as Orleans (note the lack of accent) for a number of years (they only recently added the accent back in where it belongs). However, a search for Orleans should bring up either result. Also, collations determine how content is ordered when results are returned. Take Ecole A, ecole B, École C and école D. How should that be ordered? The _ci indicates case-insensitive so we get the order we expect (as I've listed). It'd be pretty confusing to do a search and get ecole B, Ecole A, [the rest of the latin character results], école D, École C. I hope that explains it a little better. --~--~-~--~~~---~--~~ 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: Custom url in paginate CakePHP 1.2
Super, thank you very much its what i looking for. But i want ask, how i can chache paginate separator. For example now i have this url: www.page.com/catalogue/seo_url_item/page:4 But i want url: www.page.com/catalogue/seo_url_item/4, www.domen.com/catalogue/seo_url_item/5, On 15 Čen, 23:45, cakeFreak [EMAIL PROTECTED] wrote: Try something like this in your view: ?php $paginator-options = array('url'='../catalogue/'.$seourl)? Dan On 15 Giu, 21:08, Petr Vytlačil [EMAIL PROTECTED] wrote: Hi pleas can you help me? I have this function (return all entries for Journal): function entriesjournal($seourl = null) { if (!$seourl) { $this-flash(__('Invalid Journal', true), array('action'='index')); } $this-Entry-recursive = 0; $conditions = array('Journal.seourl' = $seourl); $paginationParameters = array(); $paginationParameters['controller'] = 'entries'; $paginationParameters['action'] = $this-action; $this-paginate['Entry'] = array( 'limit' = 2, 'order' = array ('Entry.datepublic' = 'desc'), 'url' = array ('url' = $paginationParameters) ); $records = $this-paginate('Entry', $conditions); //$this-Journal-findBySeourl($seourl) $this-set('journal', $records); } I call this function with this link:http://www.domen.com/cataloge/seo_url_of_journel Router setting: Router::connect('/cataloge/*', array('controller' = 'entries', 'action' = 'entriesjournal')); In View i use for show paging: div class=paging ?php echo $paginator-prev(' '.__('previous', true), array(), null, array('class'='disabled'));? | ?php echo $paginator-numbers();? ?php echo $paginator-next(__('next', true).' ', array(), null, array('class'='disabled'));? /div This generate this url:http://www.domen.com/cataloge/page:2, but it isnt go i need for router url:http://www.domen.com/cataloge/seo_url_of_journel/page:2 because a need parametr $seourl for function entriesjournal. I dont know how i can setting format url for paginator or if must set router to. THX sorry my English isnt very good. --~--~-~--~~~---~--~~ 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: Memcached in Cake 1.2
Is someone can help me? On 13 Giu, 16:17, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I would use memcached with Cake 1.2 In the manual I haven't found anything. I hope someone can help me. I have installed memcached (I can see it in phpinfo). In core.php I have uncommented the line about memcached. ANd I have set Configure::write('Cache.check', true); Then I try to call the home page of Cake. But I can see with Xdebug and WinCacheGrind that it's slower than cache with file. I can see that php::is_dir is caller over 1000 times. Is it possible? Have I mistaked something in the configuration? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to change the argument separator for named params?
Okay, I've been going insane over this, and it turns out there's a bug in the core. I'm uploading a patch to trac now. On Jun 16, 1:26 am, AD7six [EMAIL PROTECTED] wrote: On Jun 16, 1:57 am, Matt Huggins [EMAIL PROTECTED] wrote: For giggles, I also tried the following in my app_controller.php, and it didn't make a difference: Anything you try in the app controller is too late. Edit that:https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/router.ph... By calling this:https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/router.ph... in your routes file. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using Html::addCrumb in a controller action
I need to populate the breadcrumbs array from one or more controller actions. How can I do this? Any help? thanks, Olav Verhoef --~--~-~--~~~---~--~~ 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: How to change the argument separator for named params?
And here's the ticket/fix: https://trac.cakephp.org/ticket/4923 I'm glad I'm not crazy, but now I lost like 3 days of work...now to make up for lost time! On Jun 16, 4:34 am, Matt Huggins [EMAIL PROTECTED] wrote: Okay, I've been going insane over this, and it turns out there's a bug in the core. I'm uploading a patch to trac now. On Jun 16, 1:26 am, AD7six [EMAIL PROTECTED] wrote: On Jun 16, 1:57 am, Matt Huggins [EMAIL PROTECTED] wrote: For giggles, I also tried the following in my app_controller.php, and it didn't make a difference: Anything you try in the app controller is too late. Edit that:https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/router.ph... By calling this:https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/router.ph... in your routes file. --~--~-~--~~~---~--~~ 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: Upgrade Instructions ?
Hi Andy, my cakephp installation is about 3 years old. Now I want to install the latest cakephp version to be sure that there are no security holes. Are there any upgade instructions ? Do I have to change the db table structure ? I have no VERSION.TXT in my installation, but my basic.php file says: Revision: 2477 Quite old version ;-) Maybe this helps: http://book.cakephp.org/view/411/migrating-from-cakephp-1-1-to- Good luck with the migration! -- Daniel Hofstetter http://cakebaker.42dh.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 -~--~~~~--~~--~--~---
WARNING: Model del() doesn't consider conditions while deleting hasOne/hasMany associations
Hey guys, I was working with the generic upload behavior, but any kind of polymorfic association is subject to the same threat. Basically I have the following in my, for example, news model: - var $hasMany = array( 'Attachment' = array( 'foreignKey' = 'foreign_id', 'conditions' = array('Attachment.class' = 'News', 'Attachment.mimetype'='LIKE image/%'), 'order' = 'Attachment.order ASC', 'dependent' = true ), ); The cake7libs/model/model.php del method is as follows: function _deleteDependent($id, $cascade) { if (!empty($this-__backAssociation)) { $savedAssociatons = $this-__backAssociation; $this-__backAssociation = array(); } foreach (array_merge($this-hasMany, $this-hasOne) as $assoc = $data) { if ($data['dependent'] === true $cascade === true) { $model = $this-{$assoc}; $field = $model-escapeField($data['foreignKey']); $model-recursive = -1; if (isset($data['exclusive']) $data['exclusive']) { $model-deleteAll(array($field = $id)); } else { $records = $model-find('all', array('conditions' = array($field = $id), 'fields' = $model-primaryKey)); if (!empty($records)) { foreach ($records as $record) { $model-delete($record[$model-alias][$model-primaryKey]); } } } } } if (isset($savedAssociatons)) { $this-__backAssociation = $savedAssociatons; } } - As you might notice when you delete a record it only looks for the associated foreign key, and not for the further conditions specified in the hasMany association. Therefore I suggest an array_merge == am() of the conditions in the findAll as follows: You can do it in your app_model.php -- function _deleteDependent($id, $cascade) { if (!empty($this-__backAssociation)) { $savedAssociatons = $this-__backAssociation; $this-__backAssociation = array(); } foreach (array_merge($this-hasMany, $this-hasOne) as $assoc = $data) { if ($data['dependent'] === true $cascade === true) { $model = $this-{$assoc}; $field = $model-escapeField($data['foreignKey']); $model-recursive = -1; //se ho condizioni su dipendenza if(isset($data['conditions']) !empty($data['conditions']) $data['conditions']!=''){ $conditions = am($data['conditions'], array($field = $id)); } else{ $conditions = array($field = $id); } if (isset($data['exclusive']) $data['exclusive']) { $model-deleteAll($conditions); } else { $records = $model-find('all', array('conditions' = $conditions, 'fields' = $model-primaryKey)); if (!empty($records)) { foreach ($records as $record) { $model-delete($record[$model-alias][$model-primaryKey]); } } }
Re: Custom url in paginate CakePHP 1.2
Try to add a parameter in your router: Router::connect('/catalogue/*/:page', array('controller' = 'your_controller', 'action'='index')); or alternatively: Router::connect('/catalogue/(.+)/:page', array('controller' = 'your_controller', 'action'='index')); Dan --~--~-~--~~~---~--~~ 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: Captcha reload problem, works in ff not in IE
Do you load your captcha with ajax? IE7 catches ajax get requests!! Dan On 16 Giu, 00:48, bingo [EMAIL PROTECTED] wrote: Its difficult to say what the problem is without having access to code or webpage. However, I have compiled a list of issues that can cause IE7 to break but not firefox. Here is a link to my blog that discuss all these issueshttp://ragrawal.wordpress.com/2007/10/25/top-5-reasons-why-ie7-is-com... Regards, On Jun 15, 6:14 pm, Crazy [EMAIL PROTECTED] wrote: Hi, I've implemented the captcha component that was published on the bakery here:http://bakery.cakephp.org/articles/view/captcha-component-with-phpcap... Everything work fine, untill I want to reload the image. It works just fine in firefox, but when I try it in IE7 it doesn't refresh. To be more exact, it gives back the same image. I think it's something with caching or the sessions, but don't know where to start trying to solve it. Any help/hints are appreciated --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
paginate problems RC1
Call me a misery, but I seem to be having more problems with RC1 than I had with Beta. The following works as expected in Beta but invariably returns an empty set in RC1: $conditions = array(or=(array('edifici' = 'LIKE %'. $searchText.'%', 'adreca' = 'LIKE %'.$searchText.'%'))); $this-set('immobles', $this-paginate('Immoble',$conditions)); --~--~-~--~~~---~--~~ 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 links having same random ID
Actually, I ran into this problem too[1], after debugging with alerts inside prototype, I've discovered that the ajax helper is really generating the same IDs. I've ended up with my own IDs, but this seems like a ticket material, rand() should definitely be replaced with mt_rand() to solve the problem permanently. Also, I'm not sure if this is platform related, it happened to me on several Windoze and Linux machines. [1] http://groups.google.com/group/cake-php/browse_thread/thread/64c39fce5097e10b?hl=xx-bork# On Jun 16, 12:00 am, schneimi [EMAIL PROTECTED] wrote: Thx alot for your answer, srand() in beforeRender really solves the problem! :-) I think I will try out if the problem also happens on another system and write a ticket if it does. francky06l schrieb: I suppose, you can also give an id on the ajax link by passing id = 'myid' in the options array. Anyway, this is a problem if the rand() gives the same number (linked to php version or plateform ?). Maybe issuing an srand() or mt_srand() in beforeRender() would avoid such collision .. hth On Jun 15, 5:10 pm, schneimi [EMAIL PROTECTED] wrote: Hi, my site is working with tabs, so different views are present on one page at the same time, but only one is visible. Now I have the problem, that sometimes after working in different tabs, some sorting- and pagination-ajax-links stop working in the views, nothing happens on click anymore. I tracked the problem down to the ajax-links having same IDs in different tabs. I am not sure how this can be, each view is rendered by a different controller. For the sorting links I could set an ID manually, but the IDs for pagination-links coming with numbers() are given inside the paginator-helper. Is this a bug, or is there something I can do to avoid that problem? For now I edited the ajaxhelper to not just give a random ID for the links, but also place the calling controller/action within the ID to make it more unique, but I would really like not to have to edit it. (I am using cakePHP 1.2.0.6311 beta) Greetings, Michael --~--~-~--~~~---~--~~ 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: - Problem with Ajax and encoding
Thanks to Spark and AD7six for their kind help. I figured it out (big part of the problem was in my local httpd.conf file). Let me just make a summary so that everybody keep in mind when dealing with UTF-8 encoding: How to display Portuguese encoding or general UTF8 encoding in Cake or dynamic programming. Check that you have the following elements: •httpd.conf: AddDefaultCharset UTF-8, •Files must be saved with UTF-8 format (all your previous special character are now unreadable and must be rewritten), •Default.ctp: echo $html-charset('UTF-8'); (equivalent to meta http- equiv=Content-Type content=text/html; charset=UTF-8 /), •Headers should also display: html xmlns=http://www.w3.org/1999/ xhtml xml:lang=pt lang=pt dir=ltr •Database should be configured as utf8_unicode_ci for both tables and fields. That should work! On 15 Jun, 17:56, Webrickco [EMAIL PROTECTED] wrote: Thx for your kind answers. The point is that everything looks fine locally and when i put everything on the server the Ajax request fail to present data properly, however requests to the database and HTML presentation continue to work fine in ISO-8859-1, and unfortunately not in UTF-8. I would believe this is a server configuration issue and will follow your recommendation on that matter. On 15 Jun, 15:49, Spark [EMAIL PROTECTED] wrote: database default collation is just a little part, and doesn't matter as much as you may think. database connection is far more important (you can change it in config/database.php), the file you are editing is, i'm almost for sure, wrongly encoded. Try To change it in Aptana or Eclipse (under the 'edit' menu, there's a 'set encoding' option. It's the most common mistake when dealing with utf8. Another sensitive part is the *server* configurations for sending text/html. Some of very old or badly configured servers lack the possibility to send it in utf8, therefore, breaking the path between cake and the browser. This is *the* article to read. It helped me a thousand times when dealing with 'i dont need to know this' programmers:http://www.joelonsoftware.com/articles/Unicode.html Spark On Sun, Jun 15, 2008 at 6:33 AM, Webrickco [EMAIL PROTECTED] wrote: Hi, I have a problem figuring out why the result of an Ajax execution is not in the correct encoding under cake. You can see the result athttp://webrickco.com/caketest. Using the user/password david/test and clicking on the first link: Alterar a configuração dos menus. At this point the result of the consultation to the database is correctly displayed as well as all other accentuated text in the page, but if I click on a tick button (calls an Ajax function to copy the values to the edit fields and refreshes the item list), the refresh of the DIV is compromised. How do i do to keep the correct encoding after I fire an Ajax function? Some data on the site: Default.ctp: $html-charset('ISO-8859-1'); Ajax function triggered as follow: echo td.$ajax-submit('tick.png', array('update' = 'tabela', 'loaded' = Effect.BlindDown(\'tabela\')', 'url' = '/menus/update/'. $menu['Menu']['id']./.$menu['Menu']['description']./.$menu['Menu'] ['link']))./td; Database fields and tables are kept in utf8_general_ci encoding by default Thx for your help. -- [livesets]http://djspark.com.br/ [web]http://sydi.net [filmes]http://melhoresfilmes.com.br- Ocultar texto citado - - Mostrar texto citado - --~--~-~--~~~---~--~~ 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: Looking for Cook up Web sites fast with CakePHP (PDF Version)
Sliv a écrit : try a search on scribd.com It was the first place I downloaded the old version I have. --~--~-~--~~~---~--~~ 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: Captcha reload problem, works in ff not in IE
Well, My strongest (and I feel the correct) guess is that IE is caching the image. So a refresh request is not happening. You could try the following. 1) Set a 'back-dating' expires header for your captcha image. Also you could ask the browser not the cache by setting the appropriate header! OR 2) Change the url for the captcha image for every refresh. Could be done with JavaScript but for a complete page reload the method might not work Hope it helps! -Ketan. http://www.propertyjungle.in http://www.innovatechnologies.in On Jun 16, 3:14 am, Crazy [EMAIL PROTECTED] wrote: Hi, I've implemented the captcha component that was published on the bakery here:http://bakery.cakephp.org/articles/view/captcha-component-with-phpcap... Everything work fine, untill I want to reload the image. It works just fine in firefox, but when I try it in IE7 it doesn't refresh. To be more exact, it gives back the same image. I think it's something with caching or the sessions, but don't know where to start trying to solve it. Any help/hints are appreciated --~--~-~--~~~---~--~~ 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: WARNING: Model del() doesn't consider conditions while deleting hasOne/hasMany associations
I just cheked out from the repos, and it seems that this issue has now been fixed in latest revision #7198 cheers guys Dan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Seperate database for each customer
Hi, I am in the process of building and specific business administration system, where clients subscribe on the application. Initially I planned on giving each client their own database, and then by controlling on login, connecting each client to their individual database. This has worked fine in development, but now I am a bit confused about the logic in this. My reasoning for doing so was data security, because that way I would make sure that each client only had access to their specific database, but I wonder if this is a very ineffective way of doing things, and I am considering going back to the method of using one database with a client id seperating it. My current method would mean that a single server should control hundreds of databases. What is you oppinion on the best approach? If I decide to go with the client id approach, is it then possible to make a global criteria to all queries in cake or should this be done trough filtered views or similar? Thanks in advance for your attention and time on this. Regards, Michael --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
form tag disappear from html markup
I have this code which output the result of a search ?php $object_strings = array( 'articles' = 'articoli', 'pills' = 'pillole', 'previews' = 'anticipazioni', 'blogs' = 'post', 'videos' = 'video' ); $object_models = array( 'articles' = 'Article', 'pills' = 'Pill', 'previews' = 'Preview', 'blogs' = 'Blog', 'videos' = 'Video' ); ? ?php $empty = true; foreach($results as $key = $values){ if(count($values) 1) $empty = false; } if($empty) echo Non si sono risultati per la ricerca; //TODO: mettere in una casella error-box ? div class=articles_wrap ?php if(!isset($error)){ foreach($results as $key = $values){ //controlla se ci sono risultati per questa classe if(count($values) != 1){ //output del titolo foreach($object_strings as $object = $string){ if($key == $object){ ? div class=articles_title ?= ucfirst($string);? /div ?php break; } } //trova il model $modello = ''; foreach($object_models as $controller = $model){ if($controller == $key){ $modello = $model; break; } } //output dei dati foreach($values as $i = $data){ if($i != 'total'){ //evita di stampare il totale ? div class=articles_title-list a href=?= HTTP_FULL_BASE_URL; ?/?= $key; ?/view/?= $data[$modello]['id']; ??= $data[$modello]['title']; ?/a /div ?php } } //ultimo box - paginazione o rimando a risultati completi if(count($results) == 1){ //risultati completi per una singola classe $goBack = $page - 1 = 0 ? null : $page -1; $goForward = $results[$key]['total'] / $limit $page? $page + 1 : null; $urlBack = /finder/search/$key/$limit/$goBack; $urlForward = /finder/search/$key/$limit/$goforward; //TODO: //totale $string $results[$key][$total]; // paginazione ? ?php }else{ //totale $string $results[$key][$total]; //form per vedere tutti i risultati $url = /finder/search/$key/20/1; //da globale a singola ? div form action=?= HTTP_FULL_BASE_URL.'/finder/serach/0/0/0/'; ? method=postinput type=hidden name=test value=test //form a href=Javascript: document.getElementById('search-form-?= $key; ?').submit();Vedi tutti i risultati/a /div ?php } } } } else{ ? div class=error_box ?= $error; ? /div ?php } ? /div form input type=text value=test2 / /form The problem I've found is that the form inside this markup is not part of the end markup. Cakephp (I think) deleted it. I've tried to write that form in a thousand ways. But it's always deleted from markup. I'm almost sure that is a bug with Cakephp because the input tag inside the form tag is not deleted. Cake deletes just the surrounding form. div form action=?= HTTP_FULL_BASE_URL.'/finder/serach/0/0/0/'; ? method=postinput type=hidden name=test value=test //form a href=Javascript: document.getElementById('search-form-?= $key; ? ').submit();Vedi tutti i risultati/a /div The other test form is there without any problemi. form input type=text value=test2 / /form Can someone explain me what's wrong? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP
Re: Looking for Cook up Web sites fast with CakePHP (PDF Version)
You could always google the title. That's how I found it. On Jun 16, 10:23 am, Marc MENDEZ [EMAIL PROTECTED] wrote: Sliv a écrit : try a search on scribd.com It was the first place I downloaded the old version I have. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Paginator
Hi, I have a page with a list of users and a form to apply a filter on that list. I want to paginate the list. The question is : is it possible to paginate an existing list which has already been filtered. I read a tutorial and it seems that you are forced to generate the list with the paginator and to use its filtering system, is it true ? Thanks 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Paginating Question
I can't seem to get it working. If you go to http://walksdemo.loraincounty.com/ and login with username: tester and password: tester and then go to the teams tab and then choose a team, and try and page through the comments, you'll see what I mean. I don't really know why it's doing this. I'm sure i've screwed up somewhere. All help is greatly appreciated as always. --~--~-~--~~~---~--~~ 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: Looking for Cook up Web sites fast with CakePHP (PDF Version)
. and what did u think I did too before I asked for it in the forum , hummm ;) ? maybe the new release is too recent to be somewhere else than IBM website ? maybe everybody think there is no update and go on keeping the old one ? leo a écrit : You could always google the title. That's how I found it. On Jun 16, 10:23 am, Marc MENDEZ [EMAIL PROTECTED] wrote: Sliv a écrit : try a search on scribd.com It was the first place I downloaded the old version I have. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How to extend CakePHP Debugger class
Hi, I am trying to extend Debugger class (cake/libs/debugger.php) in my app directory in similar way as AppModel/Controller. class AppDebugger extends Debugger I've even tried renaming the file debugger.php and app_debugger.php but without luck. Its not working! I guess its something to do with the way Debugger methods are invoked statically, though I'm not sure about this. Can someone please enlighten me and tell me how to do this? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Ajax problem
Hi, I have a problem with Ajax when I try to load new content. When I load new content into div using ajax and then I try to click on an ajax link placed into the same div I get an error Event.observe is not a function. I see that this is a common problem but still I was not able to find how to fix it. Here is the link that loads into the div: $ajax-link($html-image($img, array('alt' = 'Delete', 'border' = '0')), /uploads/delete/$id_property/$id_img, array('update' = 'allimages', 'class' = 'koko'), Are you sure you wish to delete this image?, false); and here is sample code for my controller: class UploadsController extends AppController { var $name = 'Uploads'; var $components = array('Image', 'RequestHandler'); var $layout = 'ajax'; function add($id = null) { $offer_id = $id; $result = $this-Image-upload_image_and_thumbnail($this- data,name1,573,80,uploaded,true); if($result == 'empty') { __('empty'); } else { $savedata = Array('Upload' = Array('id' = null, 'estate_id' = $offer_id, 'img' = $result)); if($this-Upload-save($savedata, false)) { $this-set('all_images', $this-selectall($offer_id)); $this-set('id_property', $offer_id); } } } function delete($id_property = null, $id_img = null) { $this-Upload-del($id_img); $this-set('all_images', $this-selectall($id_property)); $this-set('id_property', $id_property); } function selectall($id = null) { return $this-Upload-findAll(Upload.estate_id = $id); } } and here is sample view for the delete and add action: if(isset($all_images)) { foreach($all_images as $img) { $id_img = $img['Upload']['id']; $img = uploaded/small/.$img['Upload']['img']; echo $ajax-link($html-image($img, array('alt' = 'Delete', 'border' = '0')), /uploads/delete/$id_property/$id_img, array('update' = 'allimages', 'class' = 'koko'), Are you sure you wish to delete this image?, false); } } Basically I'm uploading a picture which then refreshes a div with the same picture and a link to delete it. But when I upload the picture and try to click on delete it gives me this error: Event.observe is not a function. The strange thing is that it works fine if I simply try to delete an image that is uploaded already. But if I try to upload which is essentially the same code it gives me an error. As far as I understand this has something to do with including prototype but it's included and working fine with the delete action of my controller. The problem comes after I use the add action. I will be thankful if anyone suggests a solution! Thank you in advance! regards, Kik --~--~-~--~~~---~--~~ 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: cant change document root on my hosting company
If you have mod_rewrite enabled and have uploaded app, cake, index.php, and .htaccess to your document root then it should just work, with this being said, since you are still having problems then you probably don't have mod_rewrite available to you. You will need to disable cake from thinking mod_rewrite is avaiable. You do this by uncommenting the line define ('BASE_URL', env('SCRIPT_NAME')); It should work after this point, if not, let us know. -Erik On Jun 15, 12:07 pm, kroxelikrax [EMAIL PROTECTED] wrote: Hi, Im new to cakePHP and i been constructing a page on my local computer, using MAMP. My site is working fine on my comp, but not on my website host. Im using one.com for hosting, and they dont allow me to change document root to app/webroot/. Ive tried a couple of solutions I found searching google but none worked.. how can I make my site work as i works on my local comp? sorry if this question allready have been asked but i tried to search and i came up with nothing.. This has been buggin me for the whole day... sorry for my english, im a swede=) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Sharing tmp with other applications
I have three applications running in subfolders of a webserver and I now have to migrate to a new server. My server administrotor has told me that due to new security policies he wishes all the writable folders for all apps to be in one place so that he can give write access to that folder only and make everything else read-only. I think I'll need to break cake up in a way it's not intended to be done. paths.php defines TMP as APP.'tmp'.DS. Can I redefine that in my bootstrap or something? It will end up looking like this: /docroot/app1 /docroot/app2 /docroot/app3 /sharedtmp/app1tmp/ /sharedtmp/app2tmp/ /sharedtmp/app3tmp/ I can't move the complete app folders into sharedtmp (though that would keep their structure intact) because he doesn't want any PHP code to be in writable folders. Can anyone help me out? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: paginate problems RC1
Please read the release notes regarding LIKE and other SQL operators. That should be: $conditions = array(or=(array( 'edifici LIKE %?%' = $searchText, 'adreca LIKE %?%' = $searchText ))); On Mon, 2008-06-16 at 03:07 -0700, leo wrote: Call me a misery, but I seem to be having more problems with RC1 than I had with Beta. The following works as expected in Beta but invariably returns an empty set in RC1: $conditions = array(or=(array('edifici' = 'LIKE %'. $searchText.'%', 'adreca' = 'LIKE %'.$searchText.'%'))); $this-set('immobles', $this-paginate('Immoble',$conditions)); --~--~-~--~~~---~--~~ 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: paginate problems RC1
Thanks, I'll try that. On Jun 16, 5:19 pm, Mariano Iglesias [EMAIL PROTECTED] wrote: Please read the release notes regarding LIKE and other SQL operators. That should be: $conditions = array(or=(array( 'edifici LIKE %?%' = $searchText, 'adreca LIKE %?%' = $searchText ))); On Mon, 2008-06-16 at 03:07 -0700, leo wrote: Call me a misery, but I seem to be having more problems with RC1 than I had with Beta. The following works as expected in Beta but invariably returns an empty set in RC1: $conditions = array(or=(array('edifici' = 'LIKE %'. $searchText.'%', 'adreca' = 'LIKE %'.$searchText.'%'))); $this-set('immobles', $this-paginate('Immoble',$conditions)); --~--~-~--~~~---~--~~ 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: paginate problems RC1
Where do I find the release notes? Daft question I know, but I can't find any for the current release. On Jun 16, 5:19 pm, Mariano Iglesias [EMAIL PROTECTED] wrote: Please read the release notes regarding LIKE and other SQL operators. That should be: $conditions = array(or=(array( 'edifici LIKE %?%' = $searchText, 'adreca LIKE %?%' = $searchText ))); On Mon, 2008-06-16 at 03:07 -0700, leo wrote: Call me a misery, but I seem to be having more problems with RC1 than I had with Beta. The following works as expected in Beta but invariably returns an empty set in RC1: $conditions = array(or=(array('edifici' = 'LIKE %'. $searchText.'%', 'adreca' = 'LIKE %'.$searchText.'%'))); $this-set('immobles', $this-paginate('Immoble',$conditions)); --~--~-~--~~~---~--~~ 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: Sharing tmp with other applications
Actually I tried redefining it in bootstrap.php and webroot/index.php and it's already defined elsewhere by then so I can't change it in either of those. --~--~-~--~~~---~--~~ 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: Paginating Question
works fine for me! On Jun 16, 4:21 pm, Kyle Decot [EMAIL PROTECTED] wrote: I can't seem to get it working. If you go tohttp://walksdemo.loraincounty.com/ and login with username: tester and password: tester and then go to the teams tab and then choose a team, and try and page through the comments, you'll see what I mean. I don't really know why it's doing this. I'm sure i've screwed up somewhere. All help is greatly appreciated as always. --~--~-~--~~~---~--~~ 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: Seperate database for each customer
If you use a client_id in the tables you could maybe add this filter in beforeFind in app_model ... just a hint. On Jun 16, 2:33 pm, Mickiii [EMAIL PROTECTED] wrote: Hi, I am in the process of building and specific business administration system, where clients subscribe on the application. Initially I planned on giving each client their own database, and then by controlling on login, connecting each client to their individual database. This has worked fine in development, but now I am a bit confused about the logic in this. My reasoning for doing so was data security, because that way I would make sure that each client only had access to their specific database, but I wonder if this is a very ineffective way of doing things, and I am considering going back to the method of using one database with a client id seperating it. My current method would mean that a single server should control hundreds of databases. What is you oppinion on the best approach? If I decide to go with the client id approach, is it then possible to make a global criteria to all queries in cake or should this be done trough filtered views or similar? Thanks in advance for your attention and time on this. Regards, Michael --~--~-~--~~~---~--~~ 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: Sharing tmp with other applications
Really? When I add if (!defined('TMP')) echo 'Not set!'; to webroot/index.php, the text appears. On Jun 16, 11:48 am, acoustic_overdrive [EMAIL PROTECTED] wrote: Actually I tried redefining it in bootstrap.php and webroot/index.php and it's already defined elsewhere by then so I can't change it in either of those. --~--~-~--~~~---~--~~ 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: Paginating Question
When I go to the next set of notes, it updates the div and paginates the notes but I get another whole page inside my div. Here's a screenshot. Any ideas? http://www.flickr.com/photos/[EMAIL PROTECTED]/2583838485/ --~--~-~--~~~---~--~~ 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: Sharing tmp with other applications
Hi Dave thanks for checking. I'm not using mod_rewrite, and I've just realised this means that it will actually get its folder structure set up by the index.php in the root of the installation, not the bootstrap or index.php in webroot. Which also means I think I've solved my problem because defining TMP in that index.php file seems to work fine. --~--~-~--~~~---~--~~ 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: Paginating Question
looks to me like you have a forward slash too many or too few in the controller spec in the link for the next page. On Jun 16, 6:50 pm, Kyle Decot [EMAIL PROTECTED] wrote: When I go to the next set of notes, it updates the div and paginates the notes but I get another whole page inside my div. Here's a screenshot. Any ideas? http://www.flickr.com/photos/[EMAIL PROTECTED]/2583838485/ --~--~-~--~~~---~--~~ 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: ACL inherit access not working
RC1 nightly 14.06.2008. I also had this problem in RC1 HEAD revision. PHP 5 MySQL 5 SO: Ubuntu 8.04 On Jun 14, 6:42 pm, Christian Winther [EMAIL PROTECTED] wrote: RC1 / SVN HEAD of cake1.2 - and what dbo type? -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of elGEoRgE Sent: 15. juni 2008 01:11 To: CakePHP Subject: ACLinheritaccess not working I have 2 tables: users and groups. So I setup my aco/aro configuration accordingly. The problem is that when I setup the parent permission, the check for child permissions wont work: I created the schema from scratch: --- cd 1.2.x.x_14.06.2008/cake/console $ ./cake schema run create DbAcl $ ./cake acl create aco / ROOT New Aco 'ROOT' created. $ ./cake acl create aco ROOT Users New Aco 'Users' created. $ ./cake acl create aro / Group.1 New Aro 'Group.1' created. $ ./cake acl create aro Group.1 User.2 New Aro 'User.2' created. $ ./cake acl grant User.2 Users all Permission granted. $ ./cake acl check User.2 Users all Array is allowed. $ ./cake acl check User.2 Users/access all Array is not allowed. - so I also ran the tests: http://localhost/test.php?group=acl And it fails: 3/3 test cases complete: 116 passes, 30 fails and 164 exceptions. I would like to know if anybody has had the same problem or if anybody found a solution to this. --~--~-~--~~~---~--~~ 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: How to extend CakePHP Debugger class
On Jun 16, 4:06 pm, Rahul J [EMAIL PROTECTED] wrote: Hi, I am trying to extend Debugger class (cake/libs/debugger.php) in my app directory in similar way as AppModel/Controller. class AppDebugger extends Debugger I've even tried renaming the file debugger.php and app_debugger.php but without luck. Its not working! I guess its something to do with the way Debugger methods are invoked statically, though I'm not sure about this. Can someone please enlighten me and tell me how to do this? Thanks! Why do you want to do that? AD --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
1.2 testing
Hello, I am running a production environment setup, ie I have my webroot in one folder, libs in another, and my project in another. I am having trouble running tests through the localhost/test.php method. Browsing to this page brings me to the default congratulations, you've setup cakephp correctly page. I am using the default htaccess that came with 1.2 and am wondering if this URL rewriting is the cause. Is there any more magic that I need to get things working? --~--~-~--~~~---~--~~ 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: duplicate URL's Getting Indexed
I'm not sure what you mean. I didn't change anything in my core.php file except I changed debug to 0. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using bootstrap to load app_controller
I'm using the bootstrap file to load up default controllers and other stuff. In app/config/bootstrap.php $modelPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'models' . DS); $behaviorPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'models' . DS . 'behaviors' . DS); $viewPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'views' . DS); $helperPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'views' . DS . 'helpers' . DS); $controllerPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'controllers' . DS); $componentPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'controllers' . DS . 'components' . DS); This all works as expected and cascades properly. app/controllers/test_controller.php will first if it exists if not then cake_core/shares/controllers/test_controller.php will load. But when I put an app_controller in cake_core/shares/controllers/ it always loads it even if my app has its own app_controller. It only loads the local version if I remove the one from shares. Is there any way around this? Or is it not meant to load an app_controller? -Corie --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
BTW, if you're testing this, make sure to delete your tmp/cache/ persistent/ files. -Corie On Jun 16, 3:45 pm, Corie [EMAIL PROTECTED] wrote: I'm using the bootstrap file to load up default controllers and other stuff. In app/config/bootstrap.php $modelPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'models' . DS); $behaviorPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'models' . DS . 'behaviors' . DS); $viewPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'views' . DS); $helperPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'views' . DS . 'helpers' . DS); $controllerPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'controllers' . DS); $componentPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS . 'controllers' . DS . 'components' . DS); This all works as expected and cascades properly. app/controllers/test_controller.php will first if it exists if not then cake_core/shares/controllers/test_controller.php will load. But when I put an app_controller in cake_core/shares/controllers/ it always loads it even if my app has its own app_controller. It only loads the local version if I remove the one from shares. Is there any way around this? Or is it not meant to load an app_controller? -Corie --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
On Mon, Jun 16, 2008 at 3:45 PM, Corie [EMAIL PROTECTED] wrote: I'm using the bootstrap file to load up default controllers and other stuff. Why would you do it this way when none of the examples out there do anything remotely similar to this. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
I've not found any examples. What would you recommend as a better way to share models, controllers, and views between multiple sites? -Corie On Jun 16, 3:59 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Mon, Jun 16, 2008 at 3:45 PM, Corie [EMAIL PROTECTED] wrote: I'm using the bootstrap file to load up default controllers and other stuff. Why would you do it this way when none of the examples out there do anything remotely similar to this. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
On Mon, Jun 16, 2008 at 4:11 PM, Corie [EMAIL PROTECTED] wrote: I've not found any examples. What would you recommend as a better way to share models, controllers, and views between multiple sites? -Corie Having never done that (i.e. sharing models, controllers and views between multiple sites) I do not have an answer, but from what I do know about building CakePHP apps, it is definitely not that way. Perhaps you could explain a little more what it is you are trying to do. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
I build a lot of small web sites and most of them use the same type of controllers so I'd like to be able to have one set of these to update instead of 20 to update every time I make a change. Maybe plugins would be another route to go, but that would require having to update all the sites for every small change I make. It gives me a great stepping stone to have this template when I start a new site. And when I want to add another feature I can do so for all sites at the same time. -Corie On Jun 16, 4:16 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Mon, Jun 16, 2008 at 4:11 PM, Corie [EMAIL PROTECTED] wrote: I've not found any examples. What would you recommend as a better way to share models, controllers, and views between multiple sites? -Corie Having never done that (i.e. sharing models, controllers and views between multiple sites) I do not have an answer, but from what I do know about building CakePHP apps, it is definitely not that way. Perhaps you could explain a little more what it is you are trying to do. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
On Mon, Jun 16, 2008 at 4:26 PM, Corie [EMAIL PROTECTED] wrote: I build a lot of small web sites and most of them use the same type of controllers so I'd like to be able to have one set of these to update instead of 20 to update every time I make a change. Maybe plugins would be another route to go, but that would require having to update all the sites for every small change I make. It has been my experience that CakePHP is not well suited to that task. If others have done it, I'm sure they will share their experiences. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
ail.com wrote: I build a lot of small web sites and most of them use the same type of controllers so I'd like to be able to have one set of these to update instead of 20 to update every time I make a change. Maybe plugins would be another route to go, but that would require having to update all the sites for every small change I make. It has been my experience that CakePHP is not well suited to that task. If others have done it, I'm sure they will share their experiences. It is documented in the manual http://manual.cakephp.org/view/32/installation#advanced-installation-35 I have done it and it works well, but you have to stay on top of clearing caches in 'all' sites and I have found that sharing the tmp files just doesn't give good results, there are just too many places where namespace is overloaded too much I initially did it with symlinks or external checkouts but this seems baked into the framework and worked well in my testing --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore [EMAIL PROTECTED] wrote: It is documented in the manual http://manual.cakephp.org/view/32/installation#advanced-installation-35 Thanks for pointing that out, Sam. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard: http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
This is precisely what I've done. I just can't get the app_controller shared if I ever want to use a different local app_controller. Could I do something like: if( file_exists( APP_DIR . DS . 'app_controller.php') ) { use it } else { use the shared one } Would it just need to be included? -Corie On Jun 16, 4:49 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore [EMAIL PROTECTED] wrote: It is documented in the manual http://manual.cakephp.org/view/32/installation#advanced-installation-35 Thanks for pointing that out, Sam. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Using bootstrap to load app_controller
I use a repository kind of thingy :-) I have some local sites running on my development machine which are used to create standard components (components in this case being models/controllers/views which are basically standards for other [production] sites). These are never to be changed on the sites who use them. I use a file in the vendors-directory to set variables that might be needed by the standard models/controllers and are specific to the production site. I keep a self-fabricated suite of tools to synchronize (push) a changed standard file to the production server(s), cleaning caches and tmp files etc. as things are being deployed to different OSes, different servers and non-cake applications also, this works remarkably well in my situation. Not very cache-ish though, but it works without too much effort once it is setup. Happy to learn other methods, I can for example think of using svn for such deployment(s). Just my 2ct. Paul -Original Message- I build a lot of small web sites and most of them use the same type of controllers so I'd like to be able to have one set of these to update instead of 20 to update every time I make a change. Maybe plugins would be another route to go, but that would require having to update all the sites for every small change I make. It has been my experience that CakePHP is not well suited to that task. If others have done it, I'm sure they will share their experiences. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
include model data in other views?
I am brand new to Cake and am trying to figure out what probably is a very simple problem. I have a News and Events page which has a model and controller spitting out all the news from the database, but I also have a separate static page stored in the pages directory that has mostly static content but a dynamic News and Events callout box that lists the 3 latest news items. It seems silly to create another model/ controller for this mostly static view just to get info that could be pulled directly from the News and Events model, but I'm struggling on how to do this. I've been reading on requestAction but have also heard people saying that was a poor way of accomplishing what I want to accomplish. As I'd like to learn the correct way to do it from the outset, any ideas would be greatly 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Using bootstrap to load app_controller
On Mon, Jun 16, 2008 at 1:54 PM, Corie [EMAIL PROTECTED] wrote: This is precisely what I've done. I just can't get the app_controller shared if I ever want to use a different local app_controller. Could I do something like: if( file_exists( APP_DIR . DS . 'app_controller.php') ) { use it } else { use the shared one } Would it just need to be included? I think you should open a ticket on trac.cakephp.org it seems that this is not the expected behavior but maybe they need to just clarify the documentation a little. I wouldn't think you need to do something like that. Sam D -Corie On Jun 16, 4:49 pm, Chris Hartjes [EMAIL PROTECTED] wrote: On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore [EMAIL PROTECTED] wrote: It is documented in the manual http://manual.cakephp.org/view/32/installation#advanced-installation-35 Thanks for pointing that out, Sam. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants to handling snakes... @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: ACL inherit access not working
I don't see where you created the ACO node with the alias 'access'. You must create an aco node for every possible node that will be requested. A check on a non-existant node will return FALSE, and give you a result of not allowed. On Jun 16, 9:06 am, elGEoRgE [EMAIL PROTECTED] wrote: RC1 nightly 14.06.2008. I also had this problem in RC1 HEAD revision. PHP 5 MySQL 5 SO: Ubuntu 8.04 On Jun 14, 6:42 pm, Christian Winther [EMAIL PROTECTED] wrote: RC1 / SVN HEAD of cake1.2 - and what dbo type? -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of elGEoRgE Sent: 15. juni 2008 01:11 To: CakePHP Subject: ACLinheritaccess not working I have 2 tables: users and groups. So I setup my aco/aro configuration accordingly. The problem is that when I setup the parent permission, the check for child permissions wont work: I created the schema from scratch: --- cd 1.2.x.x_14.06.2008/cake/console $ ./cake schema run create DbAcl $ ./cake acl create aco / ROOT New Aco 'ROOT' created. $ ./cake acl create aco ROOT Users New Aco 'Users' created. $ ./cake acl create aro / Group.1 New Aro 'Group.1' created. $ ./cake acl create aro Group.1 User.2 New Aro 'User.2' created. $ ./cake acl grant User.2 Users all Permission granted. $ ./cake acl check User.2 Users all Array is allowed. $ ./cake acl check User.2 Users/access all Array is not allowed. - so I also ran the tests: http://localhost/test.php?group=acl And it fails: 3/3 test cases complete: 116 passes, 30 fails and 164 exceptions. I would like to know if anybody has had the same problem or if anybody found a solution to this. --~--~-~--~~~---~--~~ 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: 1.2 testing
Might be an obvious question, but have you downloaded and installed SimpleTest into app/vendors ? -Joel. On Jun 16, 2:42 pm, Stupergenius [EMAIL PROTECTED] wrote: Hello, I am running a production environment setup, ie I have my webroot in one folder, libs in another, and my project in another. I am having trouble running tests through the localhost/test.php method. Browsing to this page brings me to the default congratulations, you've setup cakephp correctly page. I am using the default htaccess that came with 1.2 and am wondering if this URL rewriting is the cause. Is there any more magic that I need to get things working? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Javascript Form Coding Needed
Hey all, We need someone to code 3 interactive forms, and a gallery using lightbox (already installed) on an existing CakePHP site we have created for a client. We simply need someone to code it using JQuery and HTML, CSS styling will be done in house. We wil privide design, form layout and any other assets you may need. Budget for this project is $1500.00 USD, please contact [EMAIL PROTECTED] if you are interested. Thanks. ~rpeterson --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Form validation - multiple forms and multiple tables used per model
Hi, I am using one model to process and save the data for multiple forms. How do I run cake's validation methods on each form separately. At the moment you appear to define your rules in $validate outside of any functions/methods. How do I run it from within a method. In addition as my model saves to multiple tables I am not using $this- save(). How do I enforce validation without using this method? Thanks for any 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
2 Models 1 Form Being Blackholed
Hello, I have a form for editing articles, which hasMany images. Everything works fine until I try to use a multi record approach to images (e.g. Image.0.id, Image.1.id, Image.$id.src). Once I put in the Model. $id.fields using the form helper and try to submit I get blackholed. Why might this be happening. Also, I notice that if I do Image.id.0, Image.id.1, etc. ($id last, not in the middle) I'm not blackholed. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Bug in core? ContainableBehavior causing excessive SELECT's
I'm developing a site in which users create profiles (Profile model). These profiles have a significant number of 'belongsTo' bindings. When I create a standard find('first') call on the model, it performs a single SELECT statement to retrieve the model data and each associated belongsTo model data. However, when I create a find('first') call that makes use of the ContainableBehavior, it makes the same call as in the first case with an additional (seemingly unnecessary) SELECT for every belongsTo relationship in the provided list. - Here is an example of the the simple find('first'): $profile = $this-Profile-find('first', array( 'conditions' = array( 'Profile.id' = $id, 'Profile.visible' = 'Y', ), )); - And the resulting *single* SQL statement from this call: SELECT `Profile`.`id`, `Profile`.`member_id`, `Profile`.`geocode_id`, `Profile`.`gender_id`, `Profile`.`photo_id`, `Profile`.`birthdate`, `Profile`.`name`, `Profile`.`headline`, `Profile`.`description`, `Profile`.`marital_status_id`, `Profile`.`have_children`, `Profile`.`want_children`, `Profile`.`hair_color_id`, `Profile`.`height`, `Profile`.`physique_id`, `Profile`.`ethnicity_id`, `Profile`.`religion_id`, `Profile`.`politics_id`, `Profile`.`smokes`, `Profile`.`drinks`, `Profile`.`drugs`, `Profile`.`visible`, `Profile`.`created`, `Profile`.`updated`, `Member`.`id`, `Member`.`username`, `Member`.`password`, `Member`.`email`, `Member`.`active`, `Member`.`created`, `Member`.`updated`, `Geocode`.`id`, `Geocode`.`latitude`, `Geocode`.`longitude`, `Geocode`.`city`, `Geocode`.`state`, `Geocode`.`zipcode`, `Geocode`.`country_id`, `Gender`.`id`, `Gender`.`name`, `Gender`.`order`, `ProfilePhoto`.`id`, `ProfilePhoto`.`profile_id`, `ProfilePhoto`.`filename_big`, `ProfilePhoto`.`filename_thumb`, `ProfilePhoto`.`created`, `MaritalStatus`.`id`, `MaritalStatus`.`name`, `MaritalStatus`.`order`, `HairColor`.`id`, `HairColor`.`name`, `HairColor`.`order`, `Physique`.`id`, `Physique`.`name`, `Physique`.`order`, `Ethnicity`.`id`, `Ethnicity`.`name`, `Ethnicity`.`order`, `Religion`.`id`, `Religion`.`name`, `Religion`.`order`, `Politics`.`id`, `Politics`.`name`, `Politics`.`order`, `Smokes`.`id`, `Smokes`.`name`, `Smokes`.`order`, `Drinks`.`id`, `Drinks`.`name`, `Drinks`.`order`, `Drugs`.`id`, `Drugs`.`name`, `Drugs`.`order` FROM `profiles` AS `Profile` LEFT JOIN `members` AS `Member` ON (`Profile`.`member_id` = `Member`.`id`) LEFT JOIN `geocodes` AS `Geocode` ON (`Profile`.`geocode_id` = `Geocode`.`id`) LEFT JOIN `genders` AS `Gender` ON (`Profile`.`gender_id` = `Gender`.`id`) LEFT JOIN `photos` AS `ProfilePhoto` ON (`Profile`.`photo_id` = `ProfilePhoto`.`id`) LEFT JOIN `marital_statuses` AS `MaritalStatus` ON (`Profile`.`marital_status_id` = `MaritalStatus`.`id`) LEFT JOIN `hair_colors` AS `HairColor` ON (`Profile`.`hair_color_id` = `HairColor`.`id`) LEFT JOIN `physiques` AS `Physique` ON (`Profile`.`physique_id` = `Physique`.`id`) LEFT JOIN `ethnicities` AS `Ethnicity` ON (`Profile`.`ethnicity_id` = `Ethnicity`.`id`) LEFT JOIN `religions` AS `Religion` ON (`Profile`.`religion_id` = `Religion`.`id`) LEFT JOIN `politics` AS `Politics` ON (`Profile`.`politics_id` = `Politics`.`id`) LEFT JOIN `frequency_types` AS `Smokes` ON (`Profile`.`smokes` = `Smokes`.`id`) LEFT JOIN `frequency_types` AS `Drinks` ON (`Profile`.`drinks` = `Drinks`.`id`) LEFT JOIN `frequency_types` AS `Drugs` ON (`Profile`.`drugs` = `Drugs`.`id`) WHERE `Profile`.`id` = 2 AND `Profile`.`visible` = 'Y' LIMIT 1 - Now here is an example of the find('first') call that uses Containable: $profile = $this-Profile-find('first', array( 'contain'= array('Geocode', 'Geocode.Country', 'Gender.name', 'Physique.name', 'HairColor.name', 'Ethnicity.name', 'MaritalStatus.name', 'Religion.name', 'Politics.name', 'Seeking.name', 'EncounterType.name', 'Interest.name', 'Photo', 'ProfilePhoto'), 'conditions' = array( 'Profile.id' = $id, 'Profile.visible' = 'Y', ), )); - And here is the resulting *multiple* SQL SELECT dump that using Containable generates: SELECT `Profile`.`id`, `Profile`.`member_id`, `Profile`.`geocode_id`, `Profile`.`gender_id`, `Profile`.`photo_id`, `Profile`.`birthdate`, `Profile`.`name`, `Profile`.`headline`, `Profile`.`description`, `Profile`.`marital_status_id`, `Profile`.`have_children`, `Profile`.`want_children`, `Profile`.`hair_color_id`, `Profile`.`height`, `Profile`.`physique_id`, `Profile`.`ethnicity_id`, `Profile`.`religion_id`, `Profile`.`politics_id`, `Profile`.`smokes`, `Profile`.`drinks`, `Profile`.`drugs`, `Profile`.`visible`, `Profile`.`created`, `Profile`.`updated`, `Geocode`.`id`, `Geocode`.`latitude`, `Geocode`.`longitude`, `Geocode`.`city`, `Geocode`.`state`, `Geocode`.`zipcode`, `Geocode`.`country_id`, `Gender`.`name`, `ProfilePhoto`.`id`, `ProfilePhoto`.`profile_id`, `ProfilePhoto`.`filename_big`, `ProfilePhoto`.`filename_thumb`,
Custom Model Association Problems
I have the following tables with the following fields territories - id zip_start zip_end offices - id zipcode and I want to associate via hasMany and belongsTo on the following conditions (territories hasMany offices) and (offices belongsTo territories): offices.zipcode BETWEEN territories.zip_start AND territories.zip_end How can I do this in Cake? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CPMF com novo nome... é circo mesmo
http://charges.uol.com.br/2008/06/13/ratinhos-deputados-o-circo/ -- Renan Gonçalves - Software Engineer Cell Phone: +55 11 8633 6018 MSN: [EMAIL PROTECTED] São Paulo - SP/Brazil --~--~-~--~~~---~--~~ 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: file_get_contents() to get response from Cake app?
This may be really dumb, and it doesn't seem entirely consistent with the symptoms you're getting, but I thought it might be worth mentioning. Of course you probably know ?php echo false; ? will output nothing. Could this essentially be what's happening? Just on the off-chance. On May 13, 12:09 am, David Christopher Zentgraf [EMAIL PROTECTED] wrote: Hi, I have a rather peculiar problem: I have a CakePHP app that external apps need to query somedatafrom. Any app can basically send a request to a special controlleraction with a few encoded parameters in the URL, and theactionwill return a blank page with only the words true or false on it. Testing it in the browser works each time, I always get so see the expected result: http://mysite.com/mycontroller/myremoteaction/KHBAKFNV3A/KJB909/OU9- true I need to query this URL from other PHP apps, and am using file_get_contents() to do so. On my local test system this method works, on my server it doesn't. I only get blank responses (HTTP headers come back, even with a Cake cookie, but no page content). Both have identical PHP versions and all. Curl-ing the address on the command line also only gives me a blank page. I have no idea what's going on, any ideas anybody? Do I need to send something using context streams or so that browsers do but PHP/curl don't for Cake to respond to me? Chrs, Dav --~--~-~--~~~---~--~~ 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: include model data in other views?
Hi Steve, I am brand new to Cake and am trying to figure out what probably is a very simple problem. I have a News and Events page which has a model and controller spitting out all the news from the database, but I also have a separate static page stored in the pages directory that has mostly static content but a dynamic News and Events callout box that lists the 3 latest news items. It seems silly to create another model/ controller for this mostly static view just to get info that could be pulled directly from the News and Events model, but I'm struggling on how to do this. I've been reading on requestAction but have also heard people saying that was a poor way of accomplishing what I want to accomplish. As I'd like to learn the correct way to do it from the outset, any ideas would be greatly appreciated, thanks. An idea is to add an additional method to your controller (which also means the view has to be moved away from the pages directory). Hope that's enough to get you started ;-) -- Daniel Hofstetter http://cakebaker.42dh.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 -~--~~~~--~~--~--~---
Models are not committed :)
Hi guys, I've just started working with CakePHP a month ago, and although I seem to have a good grip over it, there are some things that just boggle my mind at times. The latest: I have a model for Publications that is associated to People (authors of the publication) through a bridge table mapping them. I am mass importing publications into the database. So, my logic is loop through the publications { save the publication record if($commit) {//save the publication record $publication = $publicationModel-read(NULL, $publicationModel-getLastInsertId()); /** * Associating Authors/Editors */ $authorEditors = $import_data[$pubCtr]-arrAuthorsEditors; for ($iCtr=0; $iCtrsizeof($authorEditors); $iCtr++) { // Find the suthors if the already exist echo trying to find author ...; $result = $publicationModel-Authoreditor-People-find( \People\.\lName\=' . $authorEditors[$iCtr]-lName . ' AND . \People\.\mName\=' . $authorEditors[$iCtr]-mName . ' AND . \People\.\fName\=' . $authorEditors[$iCtr]-fName . ' ); pr($result); if (!empty($result[People][peopleId])) { // if they exist, just assoicate them in the bridge table $publication['Authoreditor'] = array( 'publicationId' = $publication['Publication']['publicationId'], 'peopleId' = $result['People']['peopleId'], 'rank' = $iCtr+1, 'type' = $authorEditors[$iCtr]-type ); $publicationModel-Authoreditor-create(); $commit = $commit $publicationModel-Authoreditor-save($publication); //echo Saved ; pr($publication['Authoreditor']); } else { // if not, create the records in the People table $imp_authorsEditor = array('People' = array ( 'lName' = $authorEditors[$iCtr]-lName, 'mName' = $authorEditors[$iCtr]-mName, 'fName' = $authorEditors[$iCtr]-fName ) ); $publicationModel-Authoreditor-People-create(); $commit = $commit $publicationModel-Authoreditor-People-save($imp_authorsEditor); //echo Saved ; pr($imp_authorsEditor); if($commit) { $publicationModel-Authoreditor-create(); $publication['Authoreditor'] = array( 'publicationId' = $publication['Publication']['publicationId'], 'peopleId' = $publicationModel-Authoreditor-People-getLastInsertId(), 'rank' = $iCtr+1, 'type' = $authorEditors[$iCtr]-type ); $commit = $commit $publicationModel-Authoreditor-save($publication); //echo Saved ; pr($publication['Authoreditor']); } } } So the logic is simple .. for every publication, check if the author already exists in the people table. If not, create a record and associate with the publications. Now the problem that i noticed from the SQL logs: If there are consecutive publications with the same author who is not in the database, the find statement executes the first time and returns no record. So a record is created for that author. But for the next record, though the code exists, the select statement is not executed at all to look for the author. Is there some kind of caching of SQL results so that if a find method is called consecutively with the same parameters, the SQL is not fired again and the old result is returned? This is wrong because in the meanwhile the table was updated. Anyways, if this is the behavior, how do I get around it? Been stuck on this for a couple of days now ... -- Nirav --~--~-~--~~~---~--~~ 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: Javascript Form Coding Needed
Hi, First thing is first can u send ur design. --~--~-~--~~~---~--~~ 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: Models are not committed :)
On Tue, Jun 17, 2008 at 9:24 AM, Nirav Mehta [EMAIL PROTECTED] wrote: If there are consecutive publications with the same author who is not in the database, the find statement executes the first time and returns no record. So a record is created for that author. But for the next record, though the code exists, the select statement is not executed at all to look for the author. Is there some kind of caching of SQL results so that if a find method is called consecutively with the same parameters, the SQL is not fired again and the old result is returned? This is wrong because in the meanwhile the table was updated. Anyways, if this is the behavior, how do I get around it? Seems like you have somewhere somehow set the $model-cacheQueries to true Try var_dump($publicationModel-Authoreditor-People-cacheQueries) just before you execute the find. Also try clearing the cache files in /tmp 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 -~--~~~~--~~--~--~---