Re: 500 Internal Server Error - GoDaddy

2008-10-10 Thread Keith
There are a ton of great hosting services out there. I have been on Westhost for about 5 years now and have loved working with them. I've got 3 clients on Westhost and they too have loved them. I had 2 clients train me on how to do their site updates and they have been working directly with Wes

Re: HABTM & Belongs_To Together?

2008-10-10 Thread Keith
Just as a clarification on why I have it set up this way... The belongs_to is there because the users that creates the project becomes the owner. The has_and_belongs_to_many is there so that if a user wants someone outside their department to access it they can manually add them. The problem loo

Re: HABTM & Belongs_To Together?

2008-10-10 Thread Keith
It looks to me like this is what is happening, but it's very strange... Even when no users are associated I'm getting 8 blank associated users which is exactly how many elements are in the array... So... It looks like it's taking the first character from each part of the first entry in the arra

Re: Controller/Model Question

2008-10-10 Thread Keith
You don't necessarily need another controller. You can use that field to determine which element to display on the page that way you could just create a number of different elements and load the one you need dynamically based upon which post_type in the row you're editing. - Keith On Oct 10, 10

Re: HABTM & Belongs_To Together?

2008-10-10 Thread Keith
Thanks for the response. The documents table exists but I'm not having any issues with that relationship as it's a simple has_many and belongs_to with my user model. The real issue is why, what appears to be a valid array is rendering the way it is in the related users table on the view for the

Re: Querying Unrelated Models from a Controller

2008-10-10 Thread Wayne
Okay, that works, but it's creating a weird side effect. This is the line that I've added to my AppointmentsController to import access to the Template model: var $uses = array('Appointment','Template'); When I add this, my non-authenticated add function works fine, however the edit, which check

Re: 500 Internal Server Error - GoDaddy

2008-10-10 Thread djXternal
I e-mailed them twice now and the only response I can get from them it "we do not offer technical support for third-party applications" I asked if they could get me the logs relevant to my site for me to do the troubleshooting. So instead of trying to setup cake on godaddy, which from what I've b

Re: Validation won't work on tutorial at 1.2 RC3

2008-10-10 Thread Huen
Thank you for your replying me, Mark! I didn't imagine that the error was from the preg libraries. The PHP I use is what I got from a mirror site of CentOS' YUM repository in Japan. I'll try to look for a solution on the preg libraries. Thank you for your advice, again. - Huen On Oct 11, 4:39

Re: Controller/Model Question

2008-10-10 Thread jfgreco
David thank you for your reply. I guess my other question is, should I be creating other controllers one for each type that extend post? that way I can have different forms but the same underlying work. On Oct 10, 10:15 pm, "David C. Zentgraf" <[EMAIL PROTECTED]> wrote: > All you need to do is

Querying Unrelated Models from a Controller

2008-10-10 Thread Wayne
This might be a simple question, but everything I'm trying is not working and it's frustrating the hell out of me. I need to do a find() on a model that is not related to the model whose controller I'm currently accessing. I know how to make this work if there's a hasMany or belongsTo sort of rel

Re: Controller/Model Question

2008-10-10 Thread David C. Zentgraf
All you need to do is insert the post_type into the data array before saving it to the database. Either insert a hidden field into the form that you use to create the post, or insert it in the controller. $this->data['Post']['post_type'] = 'news'; $this->Post->save($this->data); On 11 Oct 20

Re: Querying Unrelated Models from a Controller

2008-10-10 Thread David C. Zentgraf
What you're looking for is $uses. http://book.cakephp.org/view/53/components-helpers-and-uses Or alternatively: App::import('Model', 'OtherModel'); $othermodel = new OtherModel(); On 11 Oct 2008, at 09:56, Wayne wrote: > > This might be a simple question, but everything I'm trying is not > work

Controller/Model Question

2008-10-10 Thread jfgreco
I am designing a CMS system and am new to CakePHP. I am porting everything to Cake from a legacy system, so I have a defined database already. I have a table of posts and in that table I have a column called post_type which I populate with News, Page, Event or Admin. I don't want the user to have

Re: Getting the session user_id, when login

2008-10-10 Thread villas
Hi Amita Did you check this section of the book? http://book.cakephp.org/view/392/loginRedirect On Oct 10, 12:31 pm, amita <[EMAIL PROTECTED]> wrote: > My application start from one home page where "Sign In" and "Sign Up" > link is given, > on clicking sign-in a login form comes and after login i

TreeBehaviour unsets primary key of data before save

2008-10-10 Thread acoustic_overdrive
I'm trying to use the TreeBehaviour at the same time as other behaviours and I've noticed that after the TreeBehaviour gets hold of the data array during a save operation, the "id" field in the Data is missing, which is causing my other behaviour a bit of a problem. I can see from the TreeBehavio

Re: How to Create Subdomains on your localhost - host multiple projects at once

2008-10-10 Thread Mathew
I think I do this differently. I add the virtual server to Apache as so. ServerName www.yourdomain.local DocumentRoot "C:/work/project1/www" ServerName project2.yourdomain.local DocumentRoot "C:/work/project2/www" Then I add the line in my hosts file c:/windows/system32/dri

Re: HABTM & Belongs_To Together?

2008-10-10 Thread villas
Hi Keith Not sure you've provided enough info here, and what we see looks a bit confusing. Is there also a 'documents' table? Did you set up a join table for the HABTM? What is the logic of having a Project belonging to a User in addition to using a join table so that many Projects may belong to

Re: Confusion with $uniqueIds in dbo_source.php

2008-10-10 Thread villas
Hi Brenton, Saving extra fields in the join table has been discussed a few times in the group. >From what I understand, it seems you should add an ID field to the join table and then start accessing the join table through models in other ways than simply relying on the basic HABTM functionality

Re: Reorganizing the paths

2008-10-10 Thread AD7six
On Oct 10, 11:24 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Oct 10, 10:45 pm, Steve <[EMAIL PROTECTED]> wrote: > > > I just always thought of plugins to be completely independent from the > > app and can be plugged-in to any cakephp app, which would not be the > > case for my "modules". Some pos

Re: Confusion with $uniqueIds in dbo_source.php

2008-10-10 Thread Brenton B
Basically, on a HABTM relationship, it's not returning all rows because it's filtering out for unique ids ... why?!?! In my mind, it's not logical to eliminate valid rows when returning them, there's no comments explaining why this is being done so I'm asking here. I ran into an issue where I wan

Re: Reorganizing the paths

2008-10-10 Thread AD7six
On Oct 10, 10:45 pm, Steve <[EMAIL PROTECTED]> wrote: > I just always thought of plugins to be completely independent from the > app and can be plugged-in to any cakephp app, which would not be the > case for my "modules". Some posts may use models from other modules. > > For example, I can have

Re: how to unit test a shell script

2008-10-10 Thread mark_story
I'm working on writing some tests for the core shell class, hopefully they can be used as a basis on how to write shell unit tests. But generally you can test them as you normally would test a class. Obviously you can't dispatch commands in a shell like manner. However you can build and simulate

Re: Need help with App::import for Controllers Model

2008-10-10 Thread Gwoo
you need to call $categories->constructClasses(); --~--~-~--~~~---~--~~ 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 em

Re: Confusion with $uniqueIds in dbo_source.php

2008-10-10 Thread Gwoo
You have not provided enough information for anyone to help. You need to say what you are expecting, show the results of that. Pasting core code is not of any help without that information. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Reorganizing the paths

2008-10-10 Thread Steve
I just always thought of plugins to be completely independent from the app and can be plugged-in to any cakephp app, which would not be the case for my "modules". Some posts may use models from other modules. For example, I can have a posts module that could have hasmany relationships user module

HABTM & Belongs_To Together?

2008-10-10 Thread Keith
I am running into a strange issue when I've got the following model structure: User: Has_Many: Projects HABTM: Projects Projects: Belongs_To: User HABTM: Users So...everything works fine. When I create a new project and select multiple users they are indeed associated with the project as is th

Re: Reserved words

2008-10-10 Thread Keith
According to this ticket: https://trac.cakephp.org/ticket/1318 The reserved words are in the following lists - http://api.cakephp.org/annotated.html http://us3.php.net/reserved - Keith On Oct 10, 3:15 pm, Antônio Marco <[EMAIL PROTECTED]> wrote: > Hi, there! > > Is "Plot" a CakePHP reserved wo

Reserved words

2008-10-10 Thread Antônio Marco
Hi, there! Is "Plot" a CakePHP reserved word? I'm receiving the message below: Notice (8): Undefined index: Plot [CORE/libs/view/scaffolds/ index.ctp, line 56] When I change the "Plot" to another one the message goes out. Thanks a lot. --~--~-~--~~~---~--~~ Y

Ajax Validation

2008-10-10 Thread oroo
I've used CakePHP for couple of weeks. Installed version 1.2 RC3. I am trying to make an Ajax Validation Form/Field component (or helper) class. But I could not find any tutorials or examples i can refer to. I'd like to validate each fields even before clicking submit button. And submit button(s)

Re: Cakephp, European privacy laws, key hased models

2008-10-10 Thread Nate
Do you have a reference to these laws that we could look at? On Oct 4, 4:31 am, イタリア人 <[EMAIL PROTECTED]> wrote: > Hello, > > as per the european community laws on privacy and data protection, it > seems that even if a database is stolen, it should not be possible to > reconstruct the data tables

Re: Need help with App::import for Controllers Model

2008-10-10 Thread mark_story
Importing Controllers inside of other controllers is bad mojo. There are numerous functions that are used to make a controller work outside of __construct(). You should look at perhaps moving the code you need to reuse into your models. Google 'thin controller fat model' or you can use request

Re: Reorganizing the paths

2008-10-10 Thread mark_story
Right, but does your proposed structure have a Post model in every module that would need it? Or are the modules self contained and not overlapping at all? Using plugins as standalones that you tape together with the primary app is one way of using them. Another is to think of them as mini- app

Re: Validation won't work on tutorial at 1.2 RC3

2008-10-10 Thread mark_story
Seems like there is something wrong with the preg libraries on your setup. I just ran the validation test and didn't get any errors for the Validation test. -Mark On Oct 10, 12:50 am, Huen <[EMAIL PROTECTED]> wrote: > Hi, > I downloaded the 1.2 RC3, and I began to try the tutorial > ofhttp://b

Re: Reorganizing the paths

2008-10-10 Thread dr. Hannibal Lecter
This is a bit illogical in my view. Since one controller can use many models, it doesn't seem right to group them like that. Components and behaviors would have the same issue. Seems strange, but if it makes you happy... :-) On Oct 10, 8:32 pm, Steve <[EMAIL PROTECTED]> wrote: > Because plugins

Re: Reorganizing the paths

2008-10-10 Thread Steve
Because plugins are supposed to act independently and not rely on other model/controller/views of the application. On Oct 10, 10:24 am, mark_story <[EMAIL PROTECTED]> wrote: > Why is one question.  Another is why not use plugins? > > -Mark > > On Oct 10, 12:24 am, Steve <[EMAIL PROTECTED]> wrote:

Re: Confusion with $uniqueIds in dbo_source.php

2008-10-10 Thread Brenton B
Perhaps there's a better place to ask this since no one seems to be answering it? On Oct 8, 6:22 pm, Brenton B <[EMAIL PROTECTED]> wrote: > So ... no one knows, hey? shucks. > > On Oct 7, 2:58 pm, Brenton B <[EMAIL PROTECTED]> wrote: > > > Why are we restricting rows in dbo_source.php on line 841

Re: CakePHP Install Problem

2008-10-10 Thread 3lancer.eu
Hallo again, Sorry, I don't have time to really help you today, but the 1st thing I'd suggest to do, is to change cake .htaccesses so they do the explicit redirect, ie. change [L] in rewrite-rules to [R,L] and then see where the redirect is taking you, and maybe you'll find why the hell it makes

Re: Best way to manage tags

2008-10-10 Thread dr. Hannibal Lecter
Aah, blast, supposed to be "opencakefile", my bad :-/ It's located here: http://sourceforge.net/projects/opencakefile/ I'm not sure if it's going to work with Zend, let us know if it does :-) On Oct 10, 4:06 pm, keymaster <[EMAIL PROTECTED]> wrote: > Is 'cakeopenfile' some sort of  plugin which

Re: how to create table in database from cakephp

2008-10-10 Thread qwanta
You can do this with the query method of the model. http://book.cakephp.org/view/456/query It seems like you need to create a dummy table in the database for the controller so that you can access the method: for the following example, I had to create the table "qs" to avoid an "Error: Database t

Re: how to create table in database from cakephp

2008-10-10 Thread Xavier Mathews
Ok so i ran some searches and i did not find anything. I don't think that you can do this with MYSQL but you should be able to with PHP! God i am lost this is a hard question. Here is a link! http://www.phpfreaks.com/ Hope this help! Xavier A. Mathews Student/Developer/Web-Master GG Client Based

Re: how to create table in database from cakephp

2008-10-10 Thread Phang Mulianto
oh .. you want to create table in your apps.. well , are you already try use $this->model->query http://komikz.blogsite.org On Fri, Oct 10, 2008 at 3:49 PM, gunung pangrango <[EMAIL PROTECTED]>wrote: > Hello everyone?? > > > i'm newbie in cakephp and now i'm develop web application with cak

Is it possible to use layouts files and view files which are located outside /app/views/ ?

2008-10-10 Thread dpawusiak
Is it possible to use layouts files and view files which are located outside /app/views/ ? For example in /app/user_files/views/ ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group

Re: how to unit test a shell script

2008-10-10 Thread Gabriel Gilini
So, are there any guidelines to write a Shell Test Case? On 16 set, 18:05, mark_story <[EMAIL PROTECTED]> wrote: > Jeurgen,  Testingshellclasses is a bit tricky right now > App::import() currently does not let you target shells so you have to > include them regular php style.  We are working on w

Re: Recursive Association in Model

2008-10-10 Thread Gabriel Gilini
Hi there, If you play around with Set::combine and Set::extract a bit you could achieve the desired results. As I know for a fact that you're a fellow brazilian, take a look at this blog post: http://kiss.souagil.com.br/2008/08/manipulando-arrays-associativas/ I hope it'll help you. Cheers, Gabr

How to Create Subdomains on your localhost - host multiple projects at once

2008-10-10 Thread Smelly_Eddie
I was so excited when i figured this out, and I'm sorry if it is a 'no- duh' scenario for some of you. But for me this was huge. You can host multiple CakePHP projects on your local machine, giving each their own sub-domains. Before I would literally change the document root setting in apache ev

Re: AppController being ignored

2008-10-10 Thread Larry E. Masters aka PhpNut
class EventsController extends Controller { should be: class EventsController extends AppController { -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ On Fri, Oct 10, 2008 at 10:09 AM, Fabricio Leonardo Sodano

Re: AppController being ignored

2008-10-10 Thread Fabricio Leonardo Sodano Pascazi
Ahhh, It seems I did a copy & paste from the wrong place :) Thanks a lot! It works great now. On Fri, Oct 10, 2008 at 12:17 PM, Larry E. Masters aka PhpNut < [EMAIL PROTECTED]> wrote: > class EventsController extends Controller { > should be: > > class EventsController extends AppController { >

Re: Using requestAction() on a hidden method i.e. _navigation()

2008-10-10 Thread Christof Damian
2008/10/10 MikeB <[EMAIL PROTECTED]>: > > Good point. I'm all for following best-practices. However, what if, > for examples sake, I didn't need to include the navigation in every > page? I would be wasting time querying/compiling a list of categories > that wouldn't be accessed in the view. Writ

Using maven for deployment

2008-10-10 Thread Bob Mattax
Has anyone experimented with using maven to bundle their website, and accumulate dependencies? I'm being asked to do so for our website, as all our other projects are integrated into this deployment strategy. Thanks! --~--~-~--~~~---~--~~ You received this message

Re: AppController being ignored

2008-10-10 Thread Fabricio Leonardo Sodano Pascazi
Thanks for the reply, here's my events controller Event->findAll(); $this->set('data',$data); } function admin_list(){ $data = $this->Event->find('list', array( 'fields' => array('name'), 'order' => 'name ASC', 'recursive'=>'0' )

Validation won't work on tutorial at 1.2 RC3

2008-10-10 Thread Huen
Hi, I downloaded the 1.2 RC3, and I began to try the tutorial of http://book.cakephp.org/view/219/Blog Now I have a problem on validation at http://book.cakephp.org/view/338/Data-Validation The article says "our validation error messages will be shown automatically", but I can't see any messages

Re: Getting the session user_id, when login

2008-10-10 Thread amita
My application start from one home page where "Sign In" and "Sign Up" link is given, on clicking sign-in a login form comes and after login it search for LoginController. In my application login is a part of one "Trainee" model, In Trainee model(trainee.php) function validateLogin($data) {

how to create table in database from cakephp

2008-10-10 Thread gunung pangrango
Hello everyone?? i'm newbie in cakephp and now i'm develop web application with cakephp and mysql... in my application user can add table or add field table from user interface...such us phpmyadmin user can define table name , field name , field type and more... and now i want to know how to

Need help with App::import for Controllers Model

2008-10-10 Thread benko
Hey Guys, I have a system with products and categories. In the CategoriesController there is a method breadcrumb($id) that makes use of the Category model via $this->Category->read(); In my ProductsController i'd also like to have access to the the breadcrumb($id) so I have used the code: App

some pages not found

2008-10-10 Thread ChanHan Hy
Hi CakePHP Developers, I am a newcomer to use PHP Framework and i have a question related with it. This questions are: I have configured in routes.php file like below: $Route->connect ('/', array('controller'=>'notes', 'action'=>'index')); This creates a default route for http://localhost/ to

using ajax select option

2008-10-10 Thread muddasir
I am new to cakePHP. I am using vakePHP 1.2. I want to apply ajax on select box Ascending Descending I want to select value from the above drop down list and want the selected value in related controller. Please guide me through this. I tried using observField but no success. Please give me

Re: Parameter passing in URL

2008-10-10 Thread Daniel Süpke
Thanks for your answer! Storing the id in the session is unfortunately not possible as the user may have different tabs with different ids. Anyway, I think most of the problems are solved, but suddenly there is something new (at least, I discovered it just now), which I think might be a bug:

Pagination Help

2008-10-10 Thread jst4fun
Hi all, I tried to get an answer to my problem from the IRC but failed. Well my issue is that I was a different king of pagination rather than the current one. The pagination should display a textbox instead of page numbers. This text box needs to be in between previous and next links. The purpose

Pagination Help

2008-10-10 Thread jst4fun
Hi all, I would like to have a pagination in which there wont be any numbered links instead it will be a textbox with next and previous links to each side of it. In the textbox the user can enter the page number to be loaded and then press enter. I am not sure if such an helper exist for cakephp o

Re: Linking to non-admin action from admin-action

2008-10-10 Thread MikeB
Thank you all for your responses. I appreciate the help. On Oct 10, 3:21 pm, mark_story <[EMAIL PROTECTED]> wrote: > Matthew, > > If you'd like open an RFC ticket about this subject, the router was > rebuilt in 1.2 from the ground up. If there is enough community > support to change it so you mus

Re: Reorganizing the paths

2008-10-10 Thread mark_story
Why is one question. Another is why not use plugins? -Mark On Oct 10, 12:24 am, Steve <[EMAIL PROTECTED]> wrote: > Let me just update that bootstrap code. I got rid of the extra loop: > > if ($handle = opendir(ROOT.DS.APP_DIR.DS.'modules')) { > while (false !== ($file = readdir($handle))) {

Re: Linking to non-admin action from admin-action

2008-10-10 Thread mark_story
Matthew, If you'd like open an RFC ticket about this subject, the router was rebuilt in 1.2 from the ground up. If there is enough community support to change it so you must specify the use of a prefix at all times how the prefixes are handled can be changed in a future version. -Mark On Oct 10

Re: Best way to manage tags

2008-10-10 Thread keymaster
Is 'cakeopenfile' some sort of plugin which works with Zend Studio for Eclipse? Google didn't show up anything on it. Any idea where one can learn more about it? On Oct 10, 11:33 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > Hm, methinks you might make a good use of polymorphic behavio

Why is SaveAll() limited to one assocation level?

2008-10-10 Thread keymaster
Does anyone know the reason why it was decided to limit the SaveAll() to save only one level of association ? At first glance, at least, it would seem the SaveAll() should be symmetric to the find() operation, in that you should be able to pass in a recursive parameter telling it how many levels

Re: Linking to non-admin action from admin-action

2008-10-10 Thread Mathew
$html->link('View User',array('admin'=>false,'controller'=>'users','action'=>'view','id' => $user['Users']['id'])); The prefix string needs a boolean value. If your prefix had been "chicken_add" then you would pass "chicken"=>false. I dislike Cake's implementation of the Router defaulting to the

Sanitize problem with writing negative numbers into db

2008-10-10 Thread stefanski
Hi folks, I want to clean up user input before saving into the database, but when I Sanitize::clean($this->data) it changes negative integer values like -10 into -10 and I get a database (Postgres) error because - obviously - it's not an integer anymore. I want to avoid manually cleaning avery te

Re: CakePHP Install Problem

2008-10-10 Thread darwin2kx
httpd.conf Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride All Order allow,deny Allow from All apache_error.log [Wed Oct 08 11:44:53 2008] [error] [client 127.0.0.1] Filename is not valid: c:/dev/www/cake/>

Re: Best way to manage tags

2008-10-10 Thread dr. Hannibal Lecter
Hm, methinks you might make a good use of polymorphic behavior by AD7six (for your tags model), in addition to the one you would have to write (regarding the "almost the same" logic in all three models): http://bakery.cakephp.org/articles/view/polymorphic-behavior IDE: Zend Studio or Eclips+PDT+

Re: Is validation clumsy and over complicated ?

2008-10-10 Thread Dave Porter
Thanks Amit - took a look and it looks promising. Just wondering how one installs it ? regards, Dave On Oct 10, 4:43 pm, "Amit Badkas" <[EMAIL PROTECTED]> wrote: > 2008/10/10 Dave Porter <[EMAIL PROTECTED]> > > > > > Hi Everyone, > > > I'm just doing some evaluation of Cake & finding the validat

Re: Is validation clumsy and over complicated ?

2008-10-10 Thread Amit Badkas
2008/10/10 Dave Porter <[EMAIL PROTECTED]> > > Hi Everyone, > > I'm just doing some evaluation of Cake & finding the validation code > very complex compared to the way it is done in RoR ( as one example ). > ( e.g. validates_presence_of :title, :description, :image_url ) > > It would probably be m

Re: Best way to manage tags

2008-10-10 Thread alkemann
Shared logic between models is done with Behaviors. Like the other two answers said, need more information to give a more specific answer. alek On 9 Okt, 23:55, Lukas <[EMAIL PROTECTED]> wrote: > Hi, > > lets say i have 4 models as, bs, cs and tags, as, bs, cs has HABTM > relations to tags mode

Re: Using requestAction() on a hidden method i.e. _navigation()

2008-10-10 Thread MikeB
Good point. I'm all for following best-practices. However, what if, for examples sake, I didn't need to include the navigation in every page? I would be wasting time querying/compiling a list of categories that wouldn't be accessed in the view. This is assuming that by writing code in AppControll

Is validation clumsy and over complicated ?

2008-10-10 Thread Dave Porter
Hi Everyone, I'm just doing some evaluation of Cake & finding the validation code very complex compared to the way it is done in RoR ( as one example ). ( e.g. validates_presence_of :title, :description, :image_url ) It would probably be much better if the 'cake bake' facility allowed multiple v

Re: Using requestAction() on a hidden method i.e. _navigation()

2008-10-10 Thread Dave J
Why not simply get the categories in AppController, and set them to something like $siteNavigation, so that's it available to all pages (including elements). $this->set('siteNavigation', $this->Categories->find(...)); It also removes the extra overhead of requestAction. Just remember to include

Re: Best way to manage tags

2008-10-10 Thread Steve
More details would be nice, but I'm thinking you need to create a parent class that has the common methods, then have as, bs, cs extend that class. On Oct 9, 5:55 pm, Lukas <[EMAIL PROTECTED]> wrote: > Hi, > > lets say i have 4 models as, bs, cs and tags, as, bs, cs has HABTM > relations to tags