Re: Bug report: CakePHP saving twice

2009-10-21 Thread Ma'moon
You may want to open a ticket @ https://trac.cakephp.org/ stating the steps to reproduce your claims so that the core DEVs may review it and fix it. On Wed, Oct 21, 2009 at 12:32 AM, Rawna asumaw...@gmail.com wrote: I just found out that CakePHP saving twice when I have warnings (as I saw it

What's wrong with pagination sorting?

2009-10-21 Thread Will Poillion
I've been pulling my hair out on this for a while now, and it just seems like the pagination sorting isn't working correctly. Using the defaults views/controllers created by cakebake, I get these headers in my view and this index function in my controller. th?php echo

Re: What's wrong with pagination sorting?

2009-10-21 Thread Will Poillion
Ok, I found the problem everyone. For anyone also having this problem, it is the default pagination. var $paginate = array('limit' = 100, 'page' = 1, 'sort' = 'name', 'direction' = 'asc'); If you set a default sort and direction in your controller, all of your sorting will only work in one

Re: What's wrong with pagination sorting?

2009-10-21 Thread Cristian Cassina
Thanks Will, I didn't know this and find it useful, having my troubles, from time to time, with pagination. Cristian Will Poillion ha scritto: Ok, I found the problem everyone. For anyone also having this problem, it is the default pagination. var $paginate = array('limit' = 100, 'page' =

Pagination with hasMany association

2009-10-21 Thread Fabian
I have two table: Contestant and Votes Contestant hasMany Votes I've tried doing a count(Vote.id) as Votes so I can place it on the recordset and just paginate them but I have no idea where to place it. I did it on the fields array but it give me the total count of votes regardless of the

HABTM extra-field and form syntax

2009-10-21 Thread emmexx
I read the many posts and articles on HABTM and extra-field but my problem is a little bit more difficult (to me) than the simple examples I found there. I'd like to implement a system to evaluate some parameter. The parameter has a model and is HABTM with the main model. In the HABTM table I

Re: Bug report: CakePHP saving twice

2009-10-21 Thread Dr. Loboto
Going twice may occur because of requestAction somewhere. On Oct 21, 11:32 am, Rawna asumaw...@gmail.com wrote: I just found out that CakePHP saving twice when I have warnings (as I saw it in debug.log) E.g. I have $this-Model-save() in my controller And I have this in my default.ctp

Re: Object not found

2009-10-21 Thread Dr. Loboto
Do not use IBM tutorial. It is extremely outdated and bad initially. Try official tutorials instead: http://book.cakephp.org/view/218/Tutorials-Examples On Oct 21, 7:46 am, QJ jas...@gmail.com wrote: I just started using CakePHP using this tutorial from IBM... I have the cake directory in

Re: E-mail validation without model

2009-10-21 Thread Céryl
Jup that was the way to go! Mind you I was not against using a model, just didn't had one... So I made a mail-model, and it validates email (and subject and text not being empty)... I now use it on different places in my site via: $this-Mail-set( $this-data ); if ($this-Mail-validates()) {

Re: Bug report: CakePHP saving twice

2009-10-21 Thread AD7six
On 21 oct, 06:32, Rawna asumaw...@gmail.com wrote: I just found out that CakePHP saving twice when I have warnings (as I saw it in debug.log) E.g. I have $this-Model-save() in my controller And I have this in my default.ctp template: script type=text/javascript src=?=BASE_PATH ?js/

Re: Bug report: CakePHP saving twice

2009-10-21 Thread AD7six
On 21 oct, 07:59, Ma'moon phpir...@gmail.com wrote: You may want to open a ticket @https://trac.cakephp.org/stating the steps to reproduce your claims so that the core DEVs may review it and fix it. That's pretty bad advice - why should cake devs bother filtering through user-land problems

Re: Your opinions about a Super Cake application library

2009-10-21 Thread AD7six
On 21 oct, 06:19, CapeTownGuy cobus.van.aa...@gmail.com wrote: To the cake reader... What do you think of creating a super cake installation somewhere that can be downloaded but that has all kinds of pre installed controllers, views, models, components, helpers, vendors etc (and

Re: submit throttling?

2009-10-21 Thread Dave
This may not be the best solution, but I've seen this implemented before with an IP's table. You could probably modify the afterSave in the app_controller to insert an entry with ip address, action, and a timestamp, then modify the beforeSave to query this table based on your criteria (X entries

Using Components (or whole Controllers) in a cake-shell

2009-10-21 Thread leberle
Hi, i'm currently working on a cake-shell cron, and i got some trouble using one of the components from my App. I need to use a method from a component that is usally used in my Orders-Controller, i tried: - App::import('Component','OrderProcess'); class OrdersCronShell

Re: Error on a fresh install

2009-10-21 Thread Vincent
Ok. I configured a MySQL DB and created a table 'post'. Added in app/routes.php: Router::connect('/posts/', array('controller' = 'posts')); Created app/controllers/posts_controller.php ?php class PostsController extends AppController { // var $name = 'Posts'; function index() {

Re: Using Components (or whole Controllers) in a cake-shell

2009-10-21 Thread leberle
Solved :) For some reason the initialization of the component failed, even if the controllers constructClasses() is called... solved by: $this-Orders = new OrdersController(); $this-Orders-constructClasses(); $this-Orders-OrderProcess-initialize($this-Orders); :) On 21 Okt., 12:44, leberle

Re: Error on a fresh install

2009-10-21 Thread Vincent
Ok, I found the problem, its du to my apache conf, I made an error with rewrite_mod directives. On 21 oct, 13:09, Vincent vjaun...@gmail.com wrote: Ok. I configured a MySQL DB and created a table 'post'. Added in app/routes.php: Router::connect('/posts/', array('controller' = 'posts'));

Before render being called twice?

2009-10-21 Thread Amit Rawat
Hello friends, I am having a problem my before render function in app controller is being called twice. can anyone tell me why is this happening? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: Before render being called twice?

2009-10-21 Thread Aivaras
Hey, we can't unless you provide us more details. Aivaras On Wed, Oct 21, 2009 at 16:09, Amit Rawat rawatami...@gmail.com wrote: Hello friends, I am having a problem my before render function in app controller is being called twice. can anyone tell me why is this happening?

Setting cookie for cached pages?

2009-10-21 Thread Kana
I need to set a cookie every time a page is opened. When a page is not cached, this is no problem. But for cached pages this is. What must I do to be able to a cookie as soon as I open a cached file? Kana --~--~-~--~~~---~--~~ You received this message because

Pages Controller

2009-10-21 Thread Dave Maharaj :: WidePixels.com
I have my site index www.site/ go to Router::connect('/', array( 'controller' = 'pages', 'action' = 'display', 'home')); How can I set it to check if logged in to redirect somewhere, define template layout and general function stuff? Do you make a normal

Re: Before render being called twice?

2009-10-21 Thread euromark (munich)
i used to have this problem as well with almost all before/after functions dunno what causes this On 21 Okt., 15:10, Aivaras faifas1...@gmail.com wrote: Hey, we can't unless you provide us more details. Aivaras On Wed, Oct 21, 2009 at 16:09, Amit Rawat rawatami...@gmail.com wrote:

Re: E-mail validation without model

2009-10-21 Thread robustsolution
Dear Céryl, I use this whenever someone registers (to create a new account) or uses a contact us form for feedbacks App::import('Core', array('Validation')); if(Validation::email($email, true)) { /* it verifies $email synrax it verifies availability of the host (after the @) */ } have a nice

Is Ajax request

2009-10-21 Thread Dave Maharaj :: WidePixels.com
I have this function where its first called normally by a link (http request). Once loaded the pagination links are done via Ajax. I have 'all', 'new', 'archive' links which all get called to paginate the result using Ajax and jquery. Problem is when i go to posts/index it works fine, click 'all'

Re: submit throttling?

2009-10-21 Thread calzone
Yes, that should work well. thanks On Oct 21, 3:24 am, Dave davidcr...@gmail.com wrote: This may not be the best solution, but I've seen this implemented before with an IP's table.  You could probably modify the afterSave in the app_controller to insert an entry with ip address, action, and

Question Concerning Nested Relationships

2009-10-21 Thread Andrew
I've got a Post model set up that has a BelongsTo relationship to a Group model. This Group is related by HABTM to 1+ Media models. The Post model has other BelongsTo and HABTM relationships to other classes. What I'd like to do is in the Post model retrieve the Media models related to it

has many validation

2009-10-21 Thread kangur91
Hello, I've got table with Fields Name and file_id If I add data to the table, should execute validation. And not add to the table if this 2 fields will repeat. Anyone knows how make this way validation(two fields together)??? --~--~-~--~~~---~--~~ You received

Re: MAMP + CakePHP issues

2009-10-21 Thread fahd
Thanks for the answers. I tried upgrading my CakePHP core to the latest 1.2.5 - but the problem didn't go away. The MySQL on MAMP (5.1.37) seems to be more up- to-date than my host MediaTemples (5.1.26-rc) ... which is concerning. On Sep 25, 11:09 am, Martin Westin martin.westin...@gmail.com

Re: creating layout with multiple view

2009-10-21 Thread j0n4s.h4rtm...@googlemail.com
for my layout building (same layout, some variations) i use the magic require php command ;), no need for elements there imho. On Oct 20, 6:33 pm, kamiseq kami...@gmail.com wrote: ok, Ill try that as well, thanks On 20 Paź, 15:16, m-e- m...@ifrance.com wrote: On 20 oct, 14:42, kamiseq

Email/IMAP data source

2009-10-21 Thread td-nathan
I need to process an email inbox, monitor it for messages with a particular subject line. If it finds a match I need to get the body content, manipulate, and insert into a database. Ideally would mark the message as read and move it to another IMAP folder as well. I'm poking around PHP

Re: Error on a fresh install

2009-10-21 Thread Dr. Loboto
Route is useless. Model filename should be post.php On Oct 21, 6:09 pm, Vincent vjaun...@gmail.com wrote: Ok. I configured a MySQL DB and created a table 'post'. Added in app/routes.php: Router::connect('/posts/', array('controller' = 'posts')); Created

Cakephp auth component allow problem

2009-10-21 Thread Zahidur Rahman
Hi , How it is possible for me to allow plugins , controllers wise action permission in cakephp auth allow method.. $this-Auth-allow(array('register', 'confirm', 'forget', 'activate','reset', 'login','logout')); Thanks in advance --~--~-~--~~~---~--~~ You

Re: Cakephp auth component allow problem

2009-10-21 Thread
Might you not need to use array, just write like blow: $this-Auth-allow('register', 'confirm', 'forget', 'activate','reset', 'login','logout'); Try it^^! On 10月22日, 上午10時04分, Zahidur Rahman zahid01...@gmail.com wrote: Hi , How it is possible for me to allow plugins , controllers wise action

Re: Cakephp auth component allow problem

2009-10-21 Thread Zahidur Rahman
hmm it's working if i use array. I am using version 1.2 I hope my query was confusing for u. say i want to give access for controller articles and action detail for every one but say for controller posts and action detail i want to restrict for registered user only. then what i have to do ??

Paginator helper in Cake 1.3

2009-10-21 Thread jacmoe
I just tried to upgrade my existing Cake app from 1.2 to 1.3. And my Ajax powered paginator stopped working. :( I load the 'Js' helper in my AppController, before the Paginator helper. I have echo $this-Html-script(array('https://ajax.googleapis.com/ajax/libs/ jquery/1.3.2/jquery.min.js',

Re: Error on a fresh install

2009-10-21 Thread jacmoe
In CakePhp, database tables are plural. So create a table called posts, a controller called PostsController (posts_controller.php) and a model called Post (post.php). Read up on CakePhp naming conventions in the Cake book. :) No need to create routes for that. Controllers and tables are plural,

Re: Before render being called twice?

2009-10-21 Thread jacmoe
I am not a CakePhp expert, but if one or more controllers have this: function beforeRender() { parent::beforeRender(); } then it will be calling AppController::beforeRender (one more time). :) On Oct 21, 4:22 pm, euromark (munich) dereurom...@googlemail.com wrote: i used to have