$this->params['url'] doesn't work

2010-09-09 Thread zoran
OK, this is a real example URL is: http://www.lupusweb4.net/locations/index/3/4 If I call the command print_r ($ this-> params ['url']) from main_menus_controllers.php and function getPage() I expect the result: [url] => Array ( [url] => locations/index [var1] => 3 [var2] => 4 ) , but I get wrong

Site Wide SMTP Email?

2010-09-09 Thread Parris
Is there a way to force SMTP to be used for all email going through email component? In other words can I make one change and have it take effect everywhere? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message

Re: better to wait for cake2 than upgrade from 1.2 to 1.3?

2010-09-09 Thread j.blotus
not sure if google swallowed my reply but here is the gist: "$html->link() works just fine in 1.3. " Not quite true, especially if like me you have a lot of calls to HtmlHelper with parameters that were removed in 1.3. HtmlHelper::meta() no longer has an $inline parameter. It has been merged with

Re: better to wait for cake2 than upgrade from 1.2 to 1.3?

2010-09-09 Thread j.blotus
god i hate delayed postingdamn you google groups! On Sep 10, 12:49 am, "j.blotus" wrote: > Right, but I have maybe a few hundred views in this application, which > is in production and and I don't have tests for everything so > introducing bugs is a real possibility. Not only that I have to c

Re: better to wait for cake2 than upgrade from 1.2 to 1.3?

2010-09-09 Thread j.blotus
Right, but I have maybe a few hundred views in this application, which is in production and and I don't have tests for everything so introducing bugs is a real possibility. Not only that I have to commit and redeploy every changed view. So, not to be a dick, but it is a bit rash and daring just for

Re: better to wait for cake2 than upgrade from 1.2 to 1.3?

2010-09-09 Thread nurvzy
$html->link() works just fine in 1.3. Migration to 1.3 from 1.2 is fairily painless. follow the migration guide and you'll be done within an hour. It's well worth it, the flushed out plugin system is all win. http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3 Hope that helps, N

Re: better to wait for cake2 than upgrade from 1.2 to 1.3?

2010-09-09 Thread Jeremy Burns | Class Outfit
I don't think it's such a huge task to make most of the changes required. You can do the vast bulk of it with careful find and replaces ($form-> to $this->Form->, $html-> to $this->Html->, etc). Rash and daring, I know. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfi

Re: Cookie path getting set to /app/webroot--not honoring $this->path

2010-09-09 Thread Sam
It sounds like you've been living my life... As far as htaccess files go- are all of them stock(I think there are at least 3). Also, are you using the standard folder setup? On Sep 9, 4:56 pm, carl67lp wrote: > I'm trying to fix a zillion bugs with a script a client bought (don't > ask).  One of

better to wait for cake2 than upgrade from 1.2 to 1.3?

2010-09-09 Thread j.blotus
I am running a few sites with cake right now, some at 1.2, some at 1.3. I have considered upgrading the 1.2 sites to 1.3 but I don't think it is worth the time to rewrite all my $html->link()'s etc etc, as it is a fairly large application. I think I am going to wait for Cake2 and then start migrati

Update Pagination Numbering

2010-09-09 Thread Dave Maharaj
I know its been asked about deleting record with Ajax and getting a replacement record, so I did my own way and it deletes any record from any page your on adding to the bottom of the records with what would have been the next record inline every time so you never go back to page 1 or that foolish

Re: Validation translations

2010-09-09 Thread Dr. Loboto
Or you can define your invalidate() function in app_model: public function invalidate($field, $value = true) { if (is_string($value)) { return parent::invalidate($field, __($value)); } else { return parent::invalidate($field); } } Or you can try not use messages in

Re: Password Protecting a Directory

2010-09-09 Thread cricket
This is a non-Cake application? Where does this failed_auth.html file come into the picture? It's part of this other app? If so, the problem is likely because the requested path is from root (the webroot dir) but the app is in a subdirectory. But you said that you used htpasswd to authenticate so

Re: Password Protecting a Directory

2010-09-09 Thread Arak Tai'Roth
Anyone have any other thoughts on this issue? On Sep 9, 12:43 pm, "Arak Tai'Roth" wrote: > Thanks for the replies guys, but neither of those solutions work. > > Sorry, I didn't explain myself better. This directory doesn't > necessarily need to be called admin, but I had changed it to another > n

Cookie path getting set to /app/webroot--not honoring $this->path

2010-09-09 Thread carl67lp
I'm trying to fix a zillion bugs with a script a client bought (don't ask). One of the last "major" ones is an authentication issue. Seems that the path of the cookie is getting set to /app/webroot -- and it should be simply / according to $this->path (set in the app controller, as well as hard-c

Re: Validation translations

2010-09-09 Thread Sanza
Hi I don't know if can help you, but to manage translation of error messages i use this system. I think is much clean and simply: I put the all declaration of validate array inside the constructor of the model: function __construct($id = false, $table = null, $ds = null){

Problem to Login with "Simple Acl controlled Application" tutorial cakephp 1.3 - Lost session

2010-09-09 Thread Sanza
I have already worked with cakephp 1.2 and i have made some applications without problems about the acl but when i decided to use the new cakephp 1.3 i found this problem. Note: I have triple checked all steps of the tutorial Simple Acl controlled Application for cakephp 1.3, restart completely ma

Re: Session get deleted with chrome browser

2010-09-09 Thread Sanza
Hi Amjed, do you have solved this problem? If you can please help me! Thank you On 3 Set, 13:18, Amjed wrote: > Hi, > I have an application which works fine in Firefox. > But when I use chrome, session gets deleted/new session is created for > every page > it is not the the problem of security.le

Re: Session get deleted with chrome browser

2010-09-09 Thread Sanza
Some suggestion? Plaese help! On 6 Set, 09:16, Sanza wrote: > Hi! > I had already the security.level setted to medium and also setting to > "low" don't work. > Thank you for your suggestion but the problem persist! > Massimo > > On 6 Set, 01:52, Kamal deol wrote: > > > > > hi i read your problem

Re: limiting auth allow('display') to just one page

2010-09-09 Thread cricket
On Thu, Sep 9, 2010 at 4:29 PM, calzone wrote: > Thanks. > > I am using ACL, but not terribly comfortable with it.  I'm still > trying to figure out how to make it grant "ownership" of content that > is created by one user so only he can see it, or for other content, > that is created by a user be

Re: limiting auth allow('display') to just one page

2010-09-09 Thread calzone
Thanks. I am using ACL, but not terribly comfortable with it. I'm still trying to figure out how to make it grant "ownership" of content that is created by one user so only he can see it, or for other content, that is created by a user belonging one department so that other departments can't see

SWFUpload, CakePHP 1.3, and DebugKit combination

2010-09-09 Thread Dyske Suematsu
Just in case someone else may encounter this problem in the future: Today I discovered that in Cake 1.3, if you use DebugKit.Toolbar, the beforeFilter method to start the session given a session ID would not work with SWFUpload. I think what happens is that DebugKit would use the Session Component

Re: limiting auth allow('display') to just one page

2010-09-09 Thread cricket
On Thu, Sep 9, 2010 at 3:10 PM, calzone wrote: > I've been searching the web for an hour now trying to find out how to > do this and no one seems to be talking about it. > > Namely, the problem is that when I set $this->Auth->allow('display') > (or allowedActions or other flavors of the same thing

Re: A cakephp powered open source social news bookmarking

2010-09-09 Thread eugenioc...@hotmail.com
Yes, i could defined as a learning project, i have take a look to the algorithms in meneame script (www.meneame.net / http://websvn.meneame.net/listing.php?repname=meneame&path=/branches/version4/ ) and rewrite them. You may use the script freely, but you cant sell it. On 9 sep, 16:06, Andrei M

Re: limiting auth allow('display') to just one page

2010-09-09 Thread cricket
On Thu, Sep 9, 2010 at 3:35 PM, cricket wrote: > Auth restricts based on actions, while what you're looking for is > restriction based on request parameters. Fortunately, in your specific > case, there's a simple solution: > > public function beforeFilter() > { >        $this->Auth->deny('*'); > >

Re: A cakephp powered open source social news bookmarking

2010-09-09 Thread eugenioc...@hotmail.com
Hi, the "popular" view hasnt been writed yet. Thanks On 9 sep, 16:06, Andrei Mita wrote: >  Is it a learning project? > > On Thu, Sep 9, 2010 at 9:29 PM, mufti ali wrote: > >http://monkylinks.com/links/popular > > > *Error: * The requested address *'/links/popular'* was not found on this > > se

Re: Help with Auth Component

2010-09-09 Thread cricket
On Thu, Sep 9, 2010 at 12:57 AM, Chuck wrote: > The only beforeFilter that I'm using is in the users_controller. I > tried moving it to the app_controller but then it was't authenticating > even with the correct password. Perhaps there was another problem. But some of Auth's config should be set

limiting auth allow('display') to just one page

2010-09-09 Thread calzone
I've been searching the web for an hour now trying to find out how to do this and no one seems to be talking about it. Namely, the problem is that when I set $this->Auth->allow('display') (or allowedActions or other flavors of the same thing) I get a situation where all my /pages content is availa

Re: A cakephp powered open source social news bookmarking

2010-09-09 Thread Andrei Mita
Is it a learning project? On Thu, Sep 9, 2010 at 9:29 PM, mufti ali wrote: > http://monkylinks.com/links/popular > > *Error: * The requested address *'/links/popular'* was not found on this > server. > > > Cheers, > > Mufti > > http://webdev5.com > http://blogfreakz.com > > On Fri, Sep 10, 2010

Validation translations

2010-09-09 Thread Dmitry Shevchenko
Hi. I have a problem with translation validation messages. seems it didn't takes from view. I have a validation rules for field, it looks like: 'looking_agegroup_to' => array( 'checkRange'=>array ( 'rule' =

Re: A cakephp powered open source social news bookmarking

2010-09-09 Thread mufti ali
http://monkylinks.com/links/popular *Error: * The requested address *'/links/popular'* was not found on this server. Cheers, Mufti http://webdev5.com http://blogfreakz.com On Fri, Sep 10, 2010 at 12:54 AM, eugenioc...@hotmail.com < eugenioc...@gmail.com> wrote: > Hello to everybody, i have j

A cakephp powered open source social news bookmarking

2010-09-09 Thread eugenioc...@hotmail.com
Hello to everybody, i have just upload http://monkylinks.com/ its a cakephp powered open source social news bookmarking. It will great if you help me to test it loggin in and sending some news or just do some anon voting in http://monkylinks.com/links/shakeit You could see the source in http://co

Re: cakephp folder copy wont work

2010-09-09 Thread Tomfox Wiranata
i was close with my weird trials, haha... i appreaciate it j.blotus..thx On 9 Sep., 18:05, "j.blotus" wrote: > //initialize folder > $this->Folder = new Folder(); > //assign result of copy operation to variable (optional, but it's nice > to check if operation was a success) > $copied = $this->Fo

Re: Password Protecting a Directory

2010-09-09 Thread Arak Tai'Roth
Thanks for the replies guys, but neither of those solutions work. Sorry, I didn't explain myself better. This directory doesn't necessarily need to be called admin, but I had changed it to another name and that didn't fix the issue for me, so I changed it back to admin as that seemed more appropri

Re: maintaining page information between ajax requests

2010-09-09 Thread Miles J
You can do many things. Perhaps save the last loaded page in the session, and use that page anytime the browser is refreshed. If the session is empty, default to the homepage. On Sep 9, 9:33 am, Muthuvel Subramani wrote: > hello, > in my application i am using ajax for loading contents in homepag

maintaining page information between ajax requests

2010-09-09 Thread Muthuvel Subramani
hello, in my application i am using ajax for loading contents in homepage,about us,contact us..now when i refresh the page it shows the last requested page ie the home page but not the page loaded by ajax.. for example, ajax request 1: home page ajax request 2: about us page ajax request 3: contact

Re: cakephp folder copy wont work

2010-09-09 Thread j.blotus
//initialize folder $this->Folder = new Folder(); //assign result of copy operation to variable (optional, but it's nice to check if operation was a success) $copied = $this->Folder->copy(array('to' => '/to/path/', 'from' => '/ from/path/, 'chmod' => '755')); //check the operation if ($copied) {

Re: cakephp folder copy wont work

2010-09-09 Thread Tomfox Wiranata
i just saw the parameter need to be an array Folder::copy( $options = array() ) Parameters: array $options (to, from, chmod, skip) how would the code lool like? thx Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePH

cakephp folder copy wont work

2010-09-09 Thread Tomfox Wiranata
hi, i am using cakes api folder to copy folders...this is my code function __copyFolder($name) { $from = "../link/tmp/".$name."/"; $to = "../link/".$name."/"; if(!copy($from, $to)) { echo "error"; }else{ echo "copied

CakePHP Session on MAMP

2010-09-09 Thread xwteoh
I encounter a weird problem where I tried to search around and doesn't find the answer. Hope someone could help me over here. My problem: I set a session by calling "$this->Session->write('Suppliers', $suppliers);" my controller. However when I do "$this->Session- >read('Suppliers');" at another

Re: tokenize remove call

2010-09-09 Thread Mariano C.
I've thinked (inside the view): 1) grab the server's date/time 2) md5 it and save in $token 3) store $token in a session variable send the token to remove function through "with" parameter of ajax call: echo $ajax->link('Remove', array( 'controller' => 'collections',

Re: ajax helper for updating a div

2010-09-09 Thread Tomfox Wiranata
thx Dmitry...i tried to implement sth, based on your proposal ok for testing purpose i created an ajax view called "neat" and this is my ajax link in a view called "render_attachment" echo $ajax->link('x', array('controller' => 'links', 'action' => 'test'),

tokenize remove call

2010-09-09 Thread Mariano C.
I try to explain better. I have a remove link inside my view, something like: h_ttp://myweb.com/collections/remove/12 This will remove element with id 12, and it works perfectly. If a user call this element coping and pasting it inside a browser URL field this works too, but I want that this call

Re: ajax helper for updating a div

2010-09-09 Thread Dmitry Shevchenko
Hi, 1. place $this->render('your ajax view'); into controller deleteattachment() function 2. you can add your variables to url will look like array('controller' => 'linkables', 'action' => 'deleteattachment', param1,param2 and it will be available in the controller as $this->params. try to pr($t

Re: Set images to the sorted column

2010-09-09 Thread Amit Rawat
Hi, You check on your view like this sortKey()=='Model.fieldName'){?> sortDir()=='asc'){?> image('up.jpg',array("javascript:void(0);",'style'=>'float:left;'))?> sortDir()=='desc'){?> image('down.jpg',array("javascript:void(0);",'style'=>'float:left;'))?> Enjoy: Amit Check out the new C

Set images to the sorted column

2010-09-09 Thread Divya
Hello everybody, I want to know how to set images only for the column specified in passedArgs['sort'] parameter. I have got the solution which set the images on all columns according to their respective direction but I want to set it according to the passedArgs['sort'] parameter. Thanks in advanc

Re: Cake can't connect to DB but only shows an error that there's missing a table!

2010-09-09 Thread Joshua Muheim
OK, at least I now found out what was the problem for CakePHP not being able to connect to MySQL: more coincidentally I found the following link: http://soledadpenades.com/2006/08/06/wrong-location-of-mysqlsock/ that states that CakePHP looks in /var/mysql/mysql.sock for the mysql socket, and t

How to use paginate for sorting by two columns

2010-09-09 Thread Divya
I want to set Order By clause to sort two columns with same direction. How to implement it using paginator. I have tested by setting paginate['order'] but I also want the columns and direction in passedArgs. Check out the new CakePHP Questions site http://cakeqs.org and help others with their C

ajax helper for updating a div

2010-09-09 Thread Tomfox Wiranata
hi, again, ajax is driving me nuts. shocker! :) I have a certain DIV that echoes data from a table. with each data row comes an ajax link to delete it. when a user clicks that link, a delete() function in my controller deletes that certain data and this DIV is supposed to update. I found some cod

Cake can't connect to DB but only shows an error that there's missing a table!

2010-09-09 Thread psybear83
Hi everybody I have overtaken a CakePHP application that I have to optimize now. I have installed it on my computer, but I could't get it to run properly yet. It tells me that " Database table acos for model Aco was not found.", but the real problem is, that it can't connect to the DB! Somehow it

Re: $this->params['url'] doesn't work

2010-09-09 Thread zoran
Value of field Array ([url] => locations / index) should be within the main_menus_controller.php, but it's failure. Otherwise, with these I have not had a problem with CakePHP 1.1 version. Now I use the 1.3 version. On Sep 9, 11:42 am, "Mike Karthauser" wrote: > On Thu, September 9, 2010 9:51 a

Re: Project just displays empty page in browser after checkout from SVN

2010-09-09 Thread Joshua Muheim
oh thank you, this is really a great hint. i figured out what's the problem: cakephp can't connect to mysql! but why does it present me the error message Error: Database table acos for model Aco was not found. instead of something like "can't connect to the db"?! looks damn unpretty to me... :

Re: mod_rewrite doesn't seem to work (OSX 10.5)

2010-09-09 Thread Joshua Muheim
I got it running; it's been the problem that I didn't have the cake folder in the root of my webserver... according to this article (http://bakery.cakephp.org/articles/view/installing-cakephp-on-macos-x) this is required. strange, though, because on windows/xampp this wasn't an issue. On Thu, Sep

Re: Core validations always produce the same error msg (cannot be left blank)

2010-09-09 Thread Joshua Muheim
OK, thank you. On Wed, Sep 8, 2010 at 7:14 PM, Miles J wrote: > This isn't RoR :P > > Furthermore, the Validation class does not define any error messages. > The error message you receive is a fallback for you not defining them > yourself. > > http://github.com/cakephp/cakephp/blob/master/cake/li

Re: Project just displays empty page in browser after checkout from SVN

2010-09-09 Thread Andrei Mita
Go to /app/config In core.php you should have Configure::write('debug', 2); This will give you a very detailed explanation on what's wrong with your controller/model/view. On Thu, Sep 9, 2010 at 1:58 PM, Joshua Muheim wrote: > Thanks, it's much better now already. But I always get the error >

Re: mod_rewrite doesn't seem to work (OSX 10.5)

2010-09-09 Thread designv...@gmail.com
If you're on OSX have you made sure you actually copied over the htaccess files? OSX hides files with filenames starting with a dot (.) d. On Sep 9, 10:25 am, psybear83 wrote: > Hi everybody > > I'm trying to get my clean cakephp installation to work. when opening > the root directory, i'm getti

Re: Project just displays empty page in browser after checkout from SVN

2010-09-09 Thread Joshua Muheim
Thanks, it's much better now already. But I always get the error Error: The requested address '/users/login' was not found on this server. when accessing a page. Interestingly when I access an invalid URL (that definitely doesn't exist) the error is Error: The requested address '/' was not fou

Re: Project just displays empty page in browser after checkout from SVN

2010-09-09 Thread Andrei Mita
I believe it depends on the debug value in your config file. If you migrated a production app, the debug has to be set to 0. On Thu, Sep 9, 2010 at 12:59 PM, Joshua Muheim wrote: > woah, it was because i hadn't created a database.php file... very > strange, that it doesn't display at least some

Re: Project just displays empty page in browser after checkout from SVN

2010-09-09 Thread Joshua Muheim
woah, it was because i hadn't created a database.php file... very strange, that it doesn't display at least some ort of an include error?! On Thu, Sep 9, 2010 at 11:53 AM, psybear83 wrote: > Hello everybody > > I have worked on a project on a windows machine using XAMPP. Now I > checked the same

Project just displays empty page in browser after checkout from SVN

2010-09-09 Thread psybear83
Hello everybody I have worked on a project on a windows machine using XAMPP. Now I checked the same project out from Subversion to a mac 10.5 machine. But when opening it in a browser, the page loads for 2-3 seconds, but nothing happens: it just stays a blank, white page. No error, nothing. I'm q

Required fields and the form helper

2010-09-09 Thread Jeremy Burns
I have a form that is built using the Form helper. Its data array has a nested set of models (so I have fields such as Model1.field_name, Model2.0.field_name etc). Some of the models are correctly picking up that their fields are required (as defined by using the notEmpty validation rule) and there

Re: $this->params['url'] doesn't work

2010-09-09 Thread Mike Karthauser
On Thu, September 9, 2010 9:51 am, zoran wrote: > For example, the URL is: www.example.com/locations/index > If I call the command from > main_menus controllers and function getPage (), > I get the following output: Array ([url] => main_menus / getPage). > This is wrong! > The result should be: Ar

mod_rewrite doesn't seem to work (OSX 10.5)

2010-09-09 Thread psybear83
Hi everybody I'm trying to get my clean cakephp installation to work. when opening the root directory, i'm getting the default diagnosis website ("Your database configuration file is NOT present." etc.), but it doesn't have any CSS styles applied. It seems that mod_rewrite doesn't work on my compu

Re: Web testing: How to get the ID of a created article/post/whatever?

2010-09-09 Thread Joshua Muheim
yes, but I thought they are only available for unit testing? i couldn't find any instructions on how to use them for web testing yet. On Wed, Sep 8, 2010 at 5:41 PM, j.blotus wrote: > "As far as I know CakePHP's web testing doesn't offer the use of > fixtures, so I also can't just remove one of t

$this->params['url'] doesn't work

2010-09-09 Thread zoran
For example, the URL is: www.example.com/locations/index If I call the command print_r ($ this-> params ['url']) from main_menus controllers and function getPage (), I get the following output: Array ([url] => main_menus / getPage). This is wrong! The result should be: Array ([url] => locations / i

Re: counterCache with deeper association level

2010-09-09 Thread Andrei Mita
At least tell me I'm talking rubbish because I'm going crazy over this. I thought of linking posts to forums directly in order to get post_count to work but this will get a huge set of date on a find all query. On Tue, Sep 7, 2010 at 6:37 PM, Andrei Mita wrote: > Hello, > > I was wondering if

Re: passing a php variable with jquery to my controller

2010-09-09 Thread Tomfox Wiranata
thx miles. the JS code is in the same view as my php stuffso it should work.. i'll give it a try when i get home. again, i have learned sth. thank you :) On 9 Sep., 01:30, Miles J wrote: > You cant pass PHP variables to an external Javascript file. If the JS > was in the page, you could d

Re: CakePHP future

2010-09-09 Thread Crazy
I agree with you mark, Allot of companies are still on older php versions, the CentOS/RedHat repositories are still on 5.1.6 if I remember correctly. And I can't see them changing that any time soon. PHP 5.3 features in the framework is all good, but by doing it it will cause the framework not to