1 answer
0 votes
Whether the concept of "fat models and skinny controllers" is a good, or rather advisable way to follow in CakePHP? What are the possible pros and cons?
I came to know about the concept of "Fat Models and skinny Controllers" and I'm following the same in my project. I am doing the following things:
-I write the actions in the controller as the request first goes to the controller action
-After...
0 answers
0 votes
Web service Controller File exists, but CakePhp giving error
HI! I'm trying to create the web service in the cakePhp. I'm new to cakePhp and only recently start working on it. I found a useful tutorial at http:www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/...
1 answer
0 votes
validation and the file upload
Ok, so i've got my validation for file uploading working - awesome-o.
The problem i'm having is that my form doesn't, for whatever reason, want to *show* these errors. Here is my ctp file for the form:
<fieldset>
<legend><?php __('Upload an... 2 answers
0 votes
Validating data from controller
Hi
I have a form i need to validate and i'm not saving data to a table. For some reason the validation doesn't seem to kick in? Any help would be appreciated.
R
class SamplePack extends AppModel {
var $name = 'SamplePack';
var $useTable =... 0 answers
0 votes
Using Controller tests to find warnings
I'm doing some refactoring that affect all controllers and wanted to make sure I covered everything by looking at my controller tests and watching for errors and warnings raised with trigger_error. The problem comes that when I run a test that is...
2 answers
0 votes
Updating combo box values using AJAX
Hey all!
What I trying to do is the following: I have a form that among other things contains a combo-box with a listing of "type" that a user can select. Next to that I have an ajax link for "Add New Type", that when clicked on reveals a sub-form...
1 answer
0 votes
Update form with a twist
Hi all,
I hope someone can help me as I cannot find anything on google.
I need to update a form in cakephp into fields from different tables.
For example:
<h1Update this
<?php
echo $form-create('Post');
echo $form-input('fieldFromTable1'); //Table 1...
1 answer
0 votes
unique habtm with additional fields in the join table
Hello.
i'm coding an app to manage some training courses. My app must keep track of the expiration date and the amount paid of every subscription.
here's my guess:
Person habtm Course
but cake doesn't handle HABTM forms with additional fields in join...
1 answer
0 votes
Undefined property error, but relationships seem correct
I'm having a slight problem that I can't figure out, but should be really simple.
I have the following model structure:
ProspectiveQuote [hasMany] QuoteUnit [belongsTo] Unit
but in my ProspectiveQuotesController the...
0 answers
0 votes
Testing a controller outputs page content instead of test results
I don't know exactly how to approach this issue. I can create model, component, and helper tests without issue, but I can't get any controller tests to work properly.
No matter what the content of the actual test, instead of any test results being...
0 answers
0 votes
testAction, загрузка файлов на сервер
Здравствуйте, подскажите кто-нить. Каким образом, можно произвести тестирование загрузки фалов?
Есть у меня контроллер, например, goods_controller.php. И вот в процессе тестирования его методов при помощи testAction, столкнулся с данной...
1 answer
0 votes
subdomain url for each client
hi,
how can i change the url after the user login as "clienturl.server.com".
that clienturl will dyanmically change for each user logged in.
please help me...
1 answer
0 votes
SubControllers creating a Menue...
Hi Guys,
Is there any way in CakePHP to use a Sub-Controller or anything in that way?
I'd like to generate a menue/header or anything else which has nothing to do with the actual AppController.
But it would be cool to have a second Controller to...
1 answer
0 votes
SQL Functions in find field lists
Hi all,
I'm a newbie, just getting acquainted with cake. I've worked through the blog tutorial and I've moved on to putting together my own simple app from scratch.
So here's the thing:
I have a simple table called "artists" with three fields:...
1 answer
0 votes
SQL DUMP
The controller after a find, if I apply a die he showed the SQL DUMP, but in cake 1.3 it did not take place! How do I show an SQL dump of the Controller?
1 answer
0 votes
SMTP Issues?
I purchase a pre-made site and it sends user registrations, password reminders and news items to it's users but it will not send the information via SMTP. Here is the array - why isn't working or is a server specific issue? I am on a Linux...
1 answer
0 votes
Showing error
Why the errors : on my member_controller ?
This is listing while i'm typing names in search text box.
Undefined variable: html [APP/controllers/members_controller.php, line 165]
Fatal error: Call to a member function link() on a non-object in...
2 answers
0 votes
Show post from today, this week, this month
- Show posts from today
- Show posts from this week
- Show posts from this month
How can I get sth like that?
2 answers
0 votes
Setting Cookie from View
Hello!
I'm trying to set a background from the view. That's no problem with javascript. But I want to keep the background till the next login. So I've decided to set a cookie with the additional data in it.
I managed it to set the cookie in the...
1 answer
0 votes
Session setFlash all of a sudden brings up error
It has been working fine all night. I don't see anywhere in any of the files that I am working in where it includes the Session object so I don't think that I've deleted it. But everytime I do something to setFlash I get the following:
Notice...