Hi AD7six

Thank you for this info you have solved my problem.  It turns out that I 
had missed uploading a table associated with the last round of changes 
to implement an advertising block.

As you pointed out, the "table missing" error was being masked by the 
fact that the model wasn't available in appController beforeFilter().

All very convoluted!  However, wrapping all of my beforeFilter() code 
that used models with:

if (low($this->name) > != 'app') {
   code that accesses models here ...
}

did the trick and I was able to see the right error.  In the future I 
will do this with all appController code that requires access to model data.

I think I will also spend some time today working out how to use Ant to 
upload database changes to avoid this problem.  I am loving using Ant to 
build to dev, staging, and production servers.  It is a powerful tool.


Thank you once again to everyone who has contributed to this discussion. 
  It is a hallmark of how strong the Cake community is that you have 
helped me overcome a serious (if simple) problem so quickly.  The Cake 
framework and your support is greatly appreciated.

Regards,
Langdon



> Hi All,
> 
> It used to be true that if you declare $uses in your app controller,
> you would lose the automatic "This controller has a model of the same
> name unless you tell me otherwise" logic in child classes, but this
> change means that it isn't true anymore:
> https://trac.cakephp.org/changeset/4012/branches/1.1.x.x/cake/libs/controller/controller.php
> 
> IIRC another consequence use to be that you could invoke a loop if
> anything related to the models in your app controller were not correct
> - but if that ever was the case, it certainly isn´t true anymore it
> seems.
> 
> Irgo it seems that with a recent cake version, declaring $uses in your
> app controller doesn´t cause any problems whatsoever.
> 
> WRT the OP, it's probably worth bearing this in mind:
> If an error is triggered, an instance of the app_controller is used -
> but models are not loaded. It would be wise to put if (low($this->name)
> != 'app') {} around the use of this model to allow you to avoid it
> being run for (missing connection, missing model) errors.
> 
> HTH,
> 
> AD7six

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to