$this->passedArgs breaking my Routes

2009-03-05 Thread geoff
Hey all. I have a fairly troublesome problem that has really been grating my goat for the past little while. It has to do with the supplying of named parameters to a URL, and having them break my pagination. I have a feeling that the example below might explain this better: -

Re: I am clueless...

2009-03-05 Thread keymaster
Read the cookbook, go through the example applications at the end, and things will clear up. http://book.cakephp.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email

Re: I am clueless...

2009-03-05 Thread Delirium tremens
I need many clues, many clues... On 6 mar, 03:51, Delirium tremens wrote: > To extend CakePHP, do I have to read all of its source code? > > On 6 mar, 03:09, Delirium tremens wrote: > > > How do you work without having read all CakePHP source code? --~--~-~--~~~---~-

Re: I am clueless...

2009-03-05 Thread Delirium tremens
To extend CakePHP, do I have to read all of its source code? On 6 mar, 03:09, Delirium tremens wrote: > How do you work without having read all CakePHP source code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "C

link problem

2009-03-05 Thread kaushik
I want to create a link like this:   But if I use "link(' ', "../", array ('alt'=>'Home'))?>", it is giving this html:   If i use "link(' ', "../", array('alt'=>'Home'))?>", it is giving this html: where no link action is working. How to solve this problem? --~--~-~--~~--

Re: How to use contained models in conditions?

2009-03-05 Thread Braindead
Miles, that's bad news. But how can I solve my problem? Is there any workaround? --~--~-~--~~~---~--~~ 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 unsu

I am clueless...

2009-03-05 Thread Delirium tremens
How do you work without having read all CakePHP source code? --~--~-~--~~~---~--~~ 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 gro

Converting SQL query to Cake query

2009-03-05 Thread RyOnLife
Hello, I am having trouble converting this SQL query to a Cake query that uses find(): SELECT Page.*, COUNT(*) AS views FROM pages AS Page INNER JOIN page_views AS PageView ON Page.id = PageView.page_id GROUP BY Page.id ORDER BY COUNT(*) DESC LIMIT 10 OFFSET 0 This is what I've got, but it

RE: Labels around inputs

2009-03-05 Thread Dave Maharaj :: WidePixels.com
Nope, still shows up the same. -Original Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: March-06-09 1:20 AM To: CakePHP Subject: Re: Labels around inputs Try this, I havent tested it though. label('id', $form->input('id', array('label' => false))); ?> --~--~---

Re: Labels around inputs

2009-03-05 Thread Miles J
Try this, I havent tested it though. label('id', $form->input('id', array('label' => false))); ?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googleg

Labels around inputs

2009-03-05 Thread Dave Maharaj :: WidePixels.com
Does anyone know how I can put my inputs inside the label DIV? Right now the code rendered is: Perfect from this in the view : input(User,array('multiple'=>'checkbox','label'=>false)); ?> What I need is : Perfect I dont even care if the class=checkbox is there. Thnaks Dav

Re: customizing foreign key constraint error

2009-03-05 Thread krishan
> You could create the "onError" function (takes no parameters) in your > model, which should get called every time there is a DB error of some > kind. This idea sounds great to fulfill my requirement. Thank you my friend. --~--~-~--~~~---~--~~ You received this m

Re: Error message for the extension validation rule will not display

2009-03-05 Thread Son Dat Giang
var $validate = array( 'imageupload' => array( 'rule' => array('extension', array('gif', 'jpeg', 'png', 'jpg'), 'message' => 'Please supply a valid image.' ) ) , 'email'=>array( 'rule'=>'email', 'message'=>'Please enter a proper email' ) ); should be

Re: Best Practice?

2009-03-05 Thread Aurelius
But the I'm in the EntryController, the associations would be more complex than in the Blog. I would need to connect the Entry to the Blog to the languages and then load more Entries at the same time in the edit-page... thx Aurelius On 5 Mrz., 00:07, brian wrote: > When you fetch the data for a

Re: Update related model data

2009-03-05 Thread cakechec...@googlemail.com
hi, did you check this: http://book.cakephp.org/view/75/Saving-Your-Data --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe

Security Component & $form->file()

2009-03-05 Thread VoiDeT
Hey Everyone! I am struggling to write a file upload here. I have the security component enabled in my app_controller and as soon as i place a $form- >file() in the form and submit it, i get taken to a white page, no errors, and only a list of queries if i have them enabled. It is much like: htt

Re: HABTM-Linking multiple times to the same model

2009-03-05 Thread cakechec...@googlemail.com
hi, accidentaly I came across this, which might help you with your problem: http://www.webiscake.com/model-x-with-multiple-associations-leading-to-model-y/ the code is: array('className' => 'User', 'foreignKey' => 'sender_id' ),

Form validation without model

2009-03-05 Thread D4rko
Hi! I have a form that submits it's data to a controller, which then processes it (possibly in some complicated way) and saves it to a database. Or even doesn't save it, just uses it to render view. The point is that there is no direct relation between form fields and database tables. How do I va

Unit Testing drops Test tables

2009-03-05 Thread Damon
I have a $test database config, into which I've loaded my production database schema When I do not load the fixtures, it operates on the $default database config, adding test data to prod. That's bad When I load the test fixture via the CakeTestCase::fixtures array, it deletes the tables it jus

Re: Pagination with POST data

2009-03-05 Thread Son Dat Giang
I dunno why you want to pass pagination data via POST. POST is not good for searching and paginating. Because your result-page can not keep the content by URL of itself. So, I think, cakePHP developer team did not support pagination via POST. They don't need to be stupid. Am I right? -

Security and associated Models

2009-03-05 Thread Aurelius
Hi! I have a model Users which has Many Blogs which hasMany Entries. When I'm now in the Users edit function, I can also save Blog changes, so here's my question about Security. Does CakePHP automaticly checks if the Blog belongs to User or could I save any Blog changes through my user edit page

Re: Error message for the extension validation rule will not display

2009-03-05 Thread Dr. Loboto
'message' key-value should be in 'imageupload' array, not in 'rule' one. You messed braces. On Mar 5, 9:49 pm, ryanam1 wrote: > Hi, > > I am new to CakePHP and I am having trouble getting the extension > error message to display. The error message for the email rule > displays fine when someone

Re: Returned mail: see transcript for details

2009-03-05 Thread joshua
Can someone give a temporary solution? On Fri, Mar 6, 2009 at 5:38 AM, Alfredo Quiroga-Villamil wrote: > > Can someone please fix this. As Brian previously pointed out I am > getting one of these failures everytime I post. > > Thanks in advance, > > Alfredo > > On Thu, Mar 5, 2009 at 4:25 PM, Mai

Re: How to use contained models in conditions?

2009-03-05 Thread Miles J
@Braindead - You are allowed to use conditions with contained items, but they cannot be tier 2 relations, only the first tier (like a belongs to). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To po

Re: Cake performance tips

2009-03-05 Thread Miles J
Ill mention a few more things: - Install the DebugKit. It has load timers for everything, the controller, the views, etc so you can figure out whats taking the longest. - Look at all your queries and see what is taking the longest, and see if you can lower what fields/relations are returned to s

Re: Index page problem

2009-03-05 Thread Pooch
By default the home page routes to a "static" page which may be edited by adding home.ctp to the views\pages dir or as Blackymetal says you may reroute the page to a specific controller. You will also do well to read up on elements which allow you to place "modules" into specific views. On Mar 5,

Re: Returned mail: see transcript for details

2009-03-05 Thread Alfredo Quiroga-Villamil
Can someone please fix this. As Brian previously pointed out I am getting one of these failures everytime I post. Thanks in advance, Alfredo On Thu, Mar 5, 2009 at 4:25 PM, Mail Delivery Subsystem wrote: > The original message was received at ... > >   The following addresses had permanent

Re: Session Object seems to disappear

2009-03-05 Thread whitewolf
Hi, i solved. The page that contains the second controller didn't have the starting statement ob_start(); Inserting the statement it works correctly. bye. On 5 Mar, 17:18, whitewolf wrote: > I have some information into my session object after my login > I set the session object information into

Re: routes regex

2009-03-05 Thread Alfredo Quiroga-Villamil
Btw, I think I might have missed a digit in that regex: /\w+-\w+-\w+-\d+-\+-\d+-\w+-\w+/ Regards, Alfredo On Thu, Mar 5, 2009 at 4:18 PM, Alfredo Quiroga-Villamil wrote: > The code below is using perl; but take a look at the regex to match > the given string. I didn't test this a whole lot;

Re: routes regex

2009-03-05 Thread Alfredo Quiroga-Villamil
The code below is using perl; but take a look at the regex to match the given string. I didn't test this a whole lot; so double check it and run a few tests to see if it does what you want. use strict; use warnings; my $string = 'asus-eee-pc-900-+-2-gb-ram'; if ( $string =~ /\w+-\w+-\w+-\d+-\+

Re: Cake performance tips

2009-03-05 Thread AD7six
On Mar 5, 9:02 pm, Javier wrote: > Thx for the answers, here are some points: > 1. We do have index on my DB (from primary keys and foreign keys > mainly), usually the DB access is really fast. > 2. We aren't using the Containable behavior, but we make use of > bindModel and unBindModel to limi

Re: A better way to save to HABTM join table meta data?

2009-03-05 Thread Omi
Thanks for the reply mscdex I think if you do it the way I posted (put the field in Tag) you don't need bindModel at all. You can also use save() and not saveAll(). On Mar 5, 2:28 am, mscdex wrote: > On Mar 4, 6:52 pm, Omi wrote: > > > The correct way is to set > > $this->data['Tag'][0] = arra

routes regex

2009-03-05 Thread Alexandru Ciobanu
Hi guys, I'm having some trouble with custom routes. I'm trying to match /asus-eee-pc-900-+-2-gb-ram/1521 My line for this in routes.php is: Router::connect('/product-details/:slug/:id', array('controller' => 'store', 'action' => 'view_product', 'id', 'slug'), array('id' => '[0-9]+','slug' =>

Re: Cake performance tips

2009-03-05 Thread Javier
Thx for the answers, here are some points: 1. We do have index on my DB (from primary keys and foreign keys mainly), usually the DB access is really fast. 2. We aren't using the Containable behavior, but we make use of bindModel and unBindModel to limit the queries produced 3. I just updated to 1.

Re: Adding multiple tags at the same time

2009-03-05 Thread Xoubaman
Still don't working The content of $this->data is Array ( [Robot] => Array ( [name] => robotname [description] => robotdescription ) [Tag] => Array ( [0] => Array ( [id] => 6 [tag] => tag1 )

Re: can't pagination use the group by ?

2009-03-05 Thread Brett Wilton
I wrote a small example on this a while back, can be found here :- http://wiltonsoftware.com/posts/view/custom-group-by-pagination-and-a-calculated-field On Wed, Mar 4, 2009 at 6:22 PM, Rimoe wrote: > hi, > I have write a > var $paginate = array( >         'limit' => 50, > 'fields' => array('acc

Re: How to use contained models in conditions?

2009-03-05 Thread yogesh kumar
give me an idea of cake php query i want to create a link of values get from table and if values are same then it become one link and click that link show all values --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "C

Re: How to use contained models in conditions?

2009-03-05 Thread yogesh kumar
how i get same name values id from table pls tell 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

Re: AuthComponent doesn't work with scaffolding!

2009-03-05 Thread Cristobal
I know I'm not speaking for a popular opinion, but consider this: Scaffolding is a good way to get a prototype off the ground and show something to a client nearly instantly. Clients care about authentication. Clients would prefer to see the prototype with authentication working as the authentic

How to use contained models in conditions?

2009-03-05 Thread Braindead
Hi all, I have 3 models: Company, Site and Country. All relations are set properly. Company hasMany Site Company belongsTo Country Site belongsTo Country Using the Containable Behavior find queries and pagination works well, except one thing: I can't get conditions to work that are related to t

Re: Validate rule: multiple (CookBook -> 4.1.4.17 Multiple)

2009-03-05 Thread YBin
Hello, I am looking for a way to do it in model page too. Any luck so far? Using HABTM classname for the fieldname doesn't work at all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to thi

Re: requestAction problem with different version 1.2.0.7692 and 1.2.1.8004

2009-03-05 Thread Martin Westin
( I'll skip the usual suggestion: to not use requestAction for this purpose. It has been said too often and I am sure you have read a few already. ) That does sound strange. I can suggest only one far-fetched things to look into. The very unlikely thing that can mess with the models in this way

Re: HTTP redirect messes up Cake routes

2009-03-05 Thread brian
Have a look here: http://bakery.cakephp.org/articles/view/cakephp-in-a-subdirectory-and-no-trailing-slash On Wed, Mar 4, 2009 at 10:45 PM, gattu_marrudu wrote: > > Hi, > I am developing a website under a provider (Bluehost) which allows me > to put my website root under a subfolder. To do this I

Re: Captcha reload problem, works in ff not in IE

2009-03-05 Thread Smelly Eddie
iraj23\ That seems pretty silly. There is not much benefit of using the same captcha image on every load. The point of captcha images is to be dynamic, ensuring a warm body is on the other end of the request. If you just want to use the same image, for the same action, and the same user (like

Re: Cannot execute javascript

2009-03-05 Thread brian
On Thu, Mar 5, 2009 at 12:32 AM, SergioTorresC. wrote: > > Brian, > > Thank you for your answer. > > You are right, it was a typo. I am not using the extensions when > calling the scripts. > > When I see the view source the links appear like this: > > >

Session Object seems to disappear

2009-03-05 Thread whitewolf
I have some information into my session object after my login I set the session object information into the my user_controller. I want to redirect to another controller under particular condition. the behaviour: If i try to dump $_session object before the redirect i'll see the information corr

Error message for the extension validation rule will not display

2009-03-05 Thread ryanam1
Hi, I am new to CakePHP and I am having trouble getting the extension error message to display. The error message for the email rule displays fine when someone enters an improperly formatted email and I tried other examples of Cake's built in validation, they all seem to work fine except for the

Re: Call Functions of another controller.

2009-03-05 Thread Max Granados
well, what exactly Im trying to do is make a function that registers every movement of my application; I tried make a component but because depending of the parameters its the table that I extract the information; the component doesn't work so I tried the metod above cause was the one someone sugg

Re: Cake performance tips

2009-03-05 Thread Maine
Caching whole pages makes a difference: http://book.cakephp.org/view/346/Caching-in-the-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@googl

Re: What do you develop in (ide, text editor, etc.)?

2009-03-05 Thread Max Granados
I use Komodo edit too, it's a great editor I recommend it ;D On Mar 4, 5:43 pm, uristar wrote: > Komodo :)http://www.activestate.com/komodo_edit/ > > On Mar 1, 10:35 pm, Samuel DeVore wrote: > > > a tutu and go go boots > > > On Sun, Mar 1, 2009 at 12:34 PM, Tomás Laureano Peralta Tormey > > >

Re: What do you develop in (ide, text editor, etc.)?

2009-03-05 Thread Brendon Kozlowski
I continually forget to unsubscribe from PHPEdit's (update) newsletter, but...they recently had news announcing new support for Symfony within the editor. It has project explorer (big deal), and YAML syntax highlighting - based on indentation (again, big deal), but what it DOES do, is offer commo

Pagination with POST data

2009-03-05 Thread marco.rizze...@gmail.com
I have seen from manual that I can pass arguments to paginator functions with $paginator->options(array('url' => .)); Now with this I arguments pass via GET. How can I do If I would pass arguments via POST. Many Thanks --~--~-~--~~~---~--~~ You recei

Re: intercepting HABTM inserts - Where?

2009-03-05 Thread foldiman
I was stumbling because I thought the beforeSave() was an all or nothing thing. So if you return true, the save functionthe ENTIRE save function executes. So I was trying to query bits of the save function to specifically stop the insert query on the HABTM table. Now I realize that if I unset

Re: Custom url's

2009-03-05 Thread MaNuM
Thank you for asnwering! I think I'm close to make it work, but I'm havent been able yet... I followed the instructions of the article and what I have is: 1) A database table called "fields"(it's strange, but fields is the real name of the table :S), whose fields are id fieldname content 2) I

Re: Debug Comment Data in JSON Results

2009-03-05 Thread wirtsi
you can also change the index.php file inside the webroot directory and comment out the execution time line at the end On 4 Mrz., 03:31, Alex wrote: > Ahh, I see. Didn't think to write the debug configuration based on the > request. > > Annoying though that it appends that right? What practical

Re: Cake performance tips

2009-03-05 Thread Paul
Have you tried indexing your foreign keys? I work on an app with a page that does about 100 minimum queries per page load (it combines data from a lot of tables) and the query time spent is only about 80ms. On Mar 5, 6:10 am, Javier wrote: > Hello everyone, > I've read some posts about cakephp

HTTP redirect messes up Cake routes

2009-03-05 Thread gattu_marrudu
Hi, I am developing a website under a provider (Bluehost) which allows me to put my website root under a subfolder. To do this I had to add the following .htaccess file in the public_html folder: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?(mydomain.net)$ RewriteCond %{REQUEST_URI} !^/lii

Re: Index page problem

2009-03-05 Thread Tuhin paul
so where lies d prb? On Thu, Mar 5, 2009 at 2:42 PM, kaushik wrote: > > Below is my 'default.thtml', it is working properly. But i cannot > understand how to call any specific controller in index page. > > www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > http://www.w3.org/1999/xhtml";> > >

integrating DNSdoctor in cakephp application

2009-03-05 Thread amar goud
Hello All, I am doing one cakePHP application which requires DNSdoctor. How can i integrate DNSdoctor in my application without installing DNSdoctor. I searched on intenet , but i am not getting exact details about integrating DNSdoctor. Please any one can help me what i have to do and tell m

requestAction problem with different version 1.2.0.7692 and 1.2.1.8004

2009-03-05 Thread mazzon.mat...@gmail.com
Hello, I have a problem with requestAction when I change cakephp version from 1.2.0.7692 to 1.2.1.8004. I have this relations into Models that make a hasAndBelongsToMany from Roles table and Tabs table (in the join table I have 2 fileds more: position and active) : class RolesTab extends AppModel

Re: Cannot execute javascript

2009-03-05 Thread SergioTorresC.
Brian, Thank you for your answer. You are right, it was a typo. I am not using the extensions when calling the scripts. When I see the view source the links appear like this: And both files are, indeed, under cake/webroot/js Since my Www_Root variable is "C:\Inetpub\wwwroot\cake\app\webroo

Re: Problem with cascade deleting in cake_1.2.1.8004.

2009-03-05 Thread MalContented
Can nobody help me with this? My workaround requires me to alter the cake code to get the app working, which is not a good idea. Thanks, Mal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to

Re: Index page problem

2009-03-05 Thread Blackymetal
in /app/config/routes.php put this route : Router::connect('/', array('controller' => 'contents', 'action' => 'view',1)); On Mar 5, 6:39 am, kaushik wrote: > In front page i want to show same with "http;//www.test.com/contents/ > view/1", but the url must be like "http;//www.test.com/". How

Re: Help in DRY'ing a controllers

2009-03-05 Thread ramonmaruko
Thanks for replying, this information might come in handy later. I just noticed that I have a typo in my title. It's supposed to be 'help in dry'ing controllers' On Mar 5, 1:08 am, majna wrote: > CommonController extends AppController > all common methods here... > (remeber to set parent::befor

Re: Help in DRY'ing a controllers

2009-03-05 Thread ramonmaruko
Thanks for the links, I think I'll go with grigri's approach. On Mar 5, 1:03 am, keymaster wrote: > These links may help: > > http://groups.google.com/group/cake-php/browse_thread/thread/5339fd41...http://groups.google.com/group/cake-php/browse_thread/thread/5339fd41... --~--~-~--~~-

Re: Captcha reload problem, works in ff not in IE

2009-03-05 Thread iraj23
yes i want to see SAME captcha image on every load -- View this message in context: http://www.nabble.com/Captcha-reload-problem%2C-works-in-ff-not-in-IE-tp17855131p22349653.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~

Re: Index page problem

2009-03-05 Thread kaushik
In front page i want to show same with "http;//www.test.com/contents/ view/1", but the url must be like "http;//www.test.com/". How I can do it? On Mar 5, 4:08 pm, Miles J wrote: > What exactly are you trying to do? You need to add links to > controllers/actions before you can view them. > > I w

Re: Why we cann't use Auth component in AppController?

2009-03-05 Thread joshua
Yeah, maybe this is the only way I can access post detail now. I assume there is ancymous role in my ACL model. And the detail view page can be accessed by ancymous user. But now it seems I should give up this way. On Thu, Mar 5, 2009 at 7:07 PM, Miles J wrote: > > Add this to your posts beforeF

Re: Index page problem

2009-03-05 Thread Miles J
What exactly are you trying to do? You need to add links to controllers/actions before you can view them. I would suggest reading the whole manual before going any further. Also upgrade to 1.2. http://book.cakephp.org/ --~--~-~--~~~---~--~~ You received this messa

Re: Why we cann't use Auth component in AppController?

2009-03-05 Thread Miles J
Add this to your posts beforeFilter(). You must allow pages to be viewed publicly (meaning without logging in), else they are required to login. $this->Auth->allow('detail'); You also dont need to call ACL twice. --~--~-~--~~~---~--~~ You received this message bec

Re: Why we cann't use Auth component in AppController?

2009-03-05 Thread joshua
Thank you, Miles. I have another question. class AppController extends Controller { var $uses = array('User'); var $helpers = array('Form', 'Html', 'Pagination','Javascript','Ajax'); var $components = array('Acl','Email','Auth'); function beforeFilter() {//} } class PostsContr

Re: Captcha reload problem, works in ff not in IE

2009-03-05 Thread Dr. Loboto
I don't understand you. You want to see SAME captcha image on every load or DIFFERENT? On Mar 5, 1:53 pm, iraj23 wrote: > someone help me > i need this problem > how can i do this problem > i want  when i reload the image i see again the similar captcha again and > again > > -- > View this messa

Re: Error handling in production

2009-03-05 Thread byqsri
I think that is a very good solution. I don't know if another debug level is necessary since you resolve it in a good way. On Mar 5, 8:35 am, Aidan Lister wrote: > My previous comment was incorrect, you can easily override > ErrorHandler methods by creating app_error.php and AppError extends >