Questions tagged with controller

2 answers

0 votes

Asked by bbender, on 12/11/09 in

Error: Controller could not be found.

Greetings All,

Thanks to the answer to my other question, I now have my app up and running. yay! Anyway, now I was moving on to replacing the default cake page and replacing it with a page more formatted to my site (assuming it to be in...

1 answer

4 votes

Asked by eberfreitas, on 23/11/09 in

Managing big applications

Hey guys!

I have an application here that is growing bigger and bigger. The address is this: www.aquitanda.com [brazilian portuguese].

Basically, it's a website where you can buy and sell stuff on your own, which means people can create their own...

2 answers

0 votes

Asked by jiransluke, on 26/11/09 in

model query

Hii developers,

This is my normal sql query,

select id,title from library_items where library_items.id not in

(select issue_library_items.library_item_id from issue_library_items

where return_date is null);

Can anybody give me the corresponding...

1 answer

2 votes

Asked by codexispoetry, on 30/11/09 in

Allowing __call in AppController

Hi.

PHP5 has a __call magic method that is triggered when invoking inaccessible methods in an object context. I tried using this function as a catch-all for my missing actions, but realized that the Dispatcher checks controller classes for the...

2 answers

2 votes

Asked by mmhan.blogspot.com, on 4/12/09 in

Ajax Request

How do I know if a request was made from ajax or it was a normal web request?

I just wanted to block off the view, if it wasn't an ajax request.

1 answer

0 votes

Asked by Dominguez, on 10/12/09 in

How to avoid issues using Models and Components with the same name?

Is there any other solution than renaming the Model Class to avoid model & component name collision on the Controller?

1 answer

0 votes

Asked by oddler, on 14/12/09 in

How do i pass validation message from model to controller?

How do i pass validation message from model to controller?

1 answer

0 votes

Asked by DmitriySpb, on 15/12/09 in

Passing vars to view

For a long time I used this method of passing variable to view:


public function index(){
    $this->set('items', $this->paginate());
    $this->set('promos', $this->Promo->getRandomPromos(5));
}

OR


public function index(){
    $items =...

2 answers

0 votes

Asked by kyleb, on 19/12/09 in

Newb question: Building an index on a DB with crappy naming conventions

I'm trying to understand how to build an index in CakePHP without using scaffolding. Keep in mind that the database I am working with has tables that are in all caps and are not pluralized - example table names would be USER, VISIT, VISIT_DATA,...

1 answer

0 votes

Asked by agoddard, on 19/12/09 in

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...

2 answers

1 vote

Asked by otisjs01, on 20/12/09 in

How do I pass a variable between views?

Hello,

I am relatively new to CakePHP and I am running into a problem that I think is pretty simple, but I just can't seem to figure it out. I feel like the answer has something to do with parameters, but I'm just stumped on how to implement it!

I...

1 answer

-2 votes

Asked by jiransluke, on 21/12/09 in

edit function +data duplication

I have a member model and a home_addresses model.There is a link in the members index page,which points to the corresponding

home_address.i passed that memberid to the home_adress controller by the following code.

<?php echo...

0 answers

1 vote

Asked by stevenoxley.blogspot.com, on 28/12/09 in

How can I access the MySQL database connection from one of my controllers?

I have inherited some less-than-pretty code (using the CakePHP framework) that uses mysql_connect everywhere (at the top of practically every controller). Needless to say, that doesn't work very well when I want to change the database server...

2 answers

1 vote

Asked by saschaappel, on 30/12/09 in

$this->Auth->loginAction = 'members/login'; not works

Dear All

I try to change the default users/login to members/login.

I have aded the $this-Auth-loginAction = 'Members/login'; to appController beforeFilter() like:

class AppController extends Controller {

var $components = array('auth');

function...

1 answer

0 votes

Asked by agranstrom, on 29/12/09 in

findAll and hasMany

Hi,

I have four models, Company, Employee, BusinessUnit and BusinessUnitMember

Company belongsTo Employee

Employee hasMany BusinessUnitMember

BusinessUnitMember belongsTo BusinessUnit

BusinessUnit hasMany ...

1 answer

0 votes

Asked by otisjs01, on 29/12/09 in

How do I pass named parameters?

Hello, I am new to CakePHP and trying to learn! Sorry if my question seems simple to answer, but I'm really having a hard time figuring out how to do this!

I have an application that tracks a contract between an appraiser and a client from start...

1 answer

-1 votes

Asked by sebb86, on 3/1/10 in

How to solve "Fatal error: Cannot redeclare ..."

Hello,

when i run my application (http:127.0.0.1/hardware_units//), the following error occurs:

Fatal error: Cannot redeclare HardwareUnit::$belongsTo in C:...patch...\cake\app\models\hardware_unit.php on line 16

This error occurs also with every...

1 answer

0 votes

Asked by sebb86, on 3/1/10 in

Problem with "$html->link", which should points to an index of a controller

Hello,

code (section) of the controller:


<?php 
class HardwareUnitsController extends AppController
{
var $name = 'HardwareUnits';
  
function index()
	{
		$this->set('hardware_units', $this->HardwareUnit->find('all'));
	}
  
  function active()
 ...

1 answer

0 votes

Asked by otisjs01, on 4/1/10 in

How do I use the email component?

Hello,

I am new to CakePHP and trying desperately to learn!

My most recent struggle is with the Email Component.

I have a contract. When I create the contract, I add a user. When I save the new contract...for the first time, I want to send an email...

0 answers

0 votes

Asked by otisjs01, on 8/1/10 in

Email Component Troubles...

I recently posted a question about the CakePHP email component, and, with the help of some of the answers and comments, was able to resolve my problem...

The thing is, solving my email problem revealed another problem!

So, here's my problem:

I have...

<< previous 1   2   3   4   5   6   7   8   9