Re: Fixture not using Model useTable

2010-04-10 Thread Josh
Thanks for your response. I have been clearing cache periodically and
my debug is set to 2. I believe that when running simpleTest, cake
flashes the cache automatically at debug = 2 but I have been clearing
it myself just to be sure.

No luck still.

Any other ideas?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Fixture not using Model useTable

2010-04-10 Thread Jeremy Burns
Wild straw grabbing - is it to do with the pluralisation of the table name? 
data/datum/datums?

Jeremy Burns
jeremybu...@me.com


On 10 Apr 2010, at 07:12, Josh wrote:

 Thanks for your response. I have been clearing cache periodically and
 my debug is set to 2. I believe that when running simpleTest, cake
 flashes the cache automatically at debug = 2 but I have been clearing
 it myself just to be sure.
 
 No luck still.
 
 Any other ideas?
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 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 email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en
 
 To unsubscribe, reply using remove me as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Migration to 1.3 from 1.2

2010-04-10 Thread Dave
Just starting out here and first error in my adventure is 
 
Warning (2) javascript:void(0); : require_once(cake/libs/flay.php)
[function.require-once http://php.net/function.require-once ]: failed to
open stream: No such file or directory [CORE/cake/basics.php, line 89]
Code javascript:void(0);  | Context javascript:void(0); 
$args = func_get_args();
foreach ($args as $file) {
require_once(LIBS . strtolower($file) . '.php');
$args   =   array(
Flay
)
$file   =   Flay
uses - CORE/cake/basics.php, line 89
uses - CORE/cake/basics.php, line 89
include - APP/views/elements/jobs/featured_jobs.ctp, line 1
View::_render() - CORE/cake/libs/view/view.php, line 723
View::element() - CORE/cake/libs/view/view.php, line 385
SidebarHelper::getSidebar() - APP/views/helpers/sidebar.php, line 199
include - APP/views/layouts/default_left.ctp, line 25
View::_render() - CORE/cake/libs/view/view.php, line 723
View::renderLayout() - CORE/cake/libs/view/view.php, line 482
View::render() - CORE/cake/libs/view/view.php, line 428
Controller::render() - CORE/cake/libs/controller/controller.php, line 909
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 207
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171
[main] - APP/webroot/index.php, line 83

Fatal error: require_once() [function.require
http://php.net/function.require ]: Failed opening required
'cake/libs/flay.php'
(include_path='/home4/widepixe/public_html/dev/app/vendors/htmlpurifier/libr
ary:/home4/widepixe/public_html/dev:/home4/widepixe/public_html/dev/app/:.:/
usr/lib/php:/usr/local/lib/php') in
/home4/widepixe/public_html/dev/cake/basics.php on line 89

Any ideas?

Thanks
 
 
Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Fixture not using Model useTable

2010-04-10 Thread Josh
I just solved it after a miserable 3 hours of trouble-shooting.

SimpleTest seems to have a flaw. It has two different methods for
determining the test_suite table name. During table creation and
insertion of fixture records, it uses the test model name property.
During subsequent interaction with the test suite table, it properly
respects the useTable specification in the real model.

It took a lot of fiddling to determine that. And, due to the
pluralizations you just mentioned, I had to change the test model name
to Dat. I may add a custom inflection tomorrow but I had trouble
getting simpleTest to recognize custom inflections earlier.

I'm glad that is all over with.

Thanks for your help.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: best way to cascade against a HABTM relationship?

2010-04-10 Thread John Andersen
I would go away from the HABTM usage and just implement the foreign
key for each parent table in the child table.
You will maybe use a little more space, but you will avoid the
overhead of querying the HABTM table in every query. Also you will be
able to implement cascade delete on the relationships when the parent
is deleted.
Enjoy,
   John


On Apr 9, 6:35 pm, Joshua Taylor jo...@digitaldoginc.com wrote:
 John,

 This is not quite accurate.

 Contact A would never be associated with more than 1 parent entity.  I
 know that sounds strange, since it is a HABTM relationship.. but what
 I've set up here is a situation where 1 contact table and 1 credential
 table can serve 4 parent entities.  This way I have 2 tables instead
 of 8.

 The situation I am trying to create is similar to what you describe.
 If someone deletes a service, the associated records from the
 contacts_services, contacts, credentials_services and credentials
 tables should also be deleted.

 I know there are multiple ways to go about that.. I'm just wondering
 what the best way is.

 Thanks!

 On Apr 8, 1:23 pm, John Andersen j.andersen...@gmail.com wrote:

  Hmm, I will try to understand what you want to happen using this
  little example:

  Service A is related HABTM to Contact A
  Service A is related HABTM to Credential B
  Service B is related HABTM to Contact A
  Service B is related HABTM to Credential A

  Let's say that Service A is deleted - do you want automatically also
  to delete Contact A and Credential B?

  Is the above example something which can happen in your system?

  Enjoy,
     John

  On Apr 8, 1:16 am, Joshua Taylor jo...@digitaldoginc.com wrote: I have a 
  system with the following logical setup:

   Machine, Service, Client and Project HABTM Contact and Credential

   Contact and Credential HABTM Machine, Service, Client and Project

   It is set up this way so that I can have one table for Contact and
   Credential.  This may not be the best way to approach the situation
   (I'm no DB guru), so I'm open to suggestions, but I still need to have
   a solution for the database schema that I've already set up.

   So, here's my dilemma (example):

   If a Service is deleted, I need to delete its associated Contact and
   Credential records.

   Since HABTM relationships don't have a dependency property, how do I
   accomplish this (in a non-convoluted way)?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: How to pass a variable from a view to the associated controller?

2010-04-10 Thread sebb86
Ok. I made it working.

[controller code]
function view($temp, $value)
{
$this-set('persons', $this-paginate('Person', array('Person.'.
$temp = $value)));
}
[/code]

[view code for one table cell (in this example the table cell for
column forename)]
?php $value= $row['Person']['forename'];
$temp= forename ?
td?php echo $html-link($row['Person']['forename'],
array('controller' = 'persons', 'action' = 'view', $temp, $value)); ?
/td
[/code]

It there a better / nicer way to do this?
Thanks :)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Manipulating Data Based on Non Related Model Data

2010-04-10 Thread paws_galuten
Where does the fat model come into the picture?


On Apr 9, 9:43 pm, Jeremy Burns jeremybu...@me.com wrote:
 This could well start a storm of you're not quite right replies - but I 
 think the spirit of this answer is about right.

 In MVC:
 Models do all the data humping and nothing else. Models can have behaviours 
 (such as the tree behaviour).
 Controllers control how the application flows. Controllers can have 
 components that perform specific functions shared by many/all controllers. 
 Controllers talk to models to retrieve/save data, and then send it to views.
 Views do all the presentation and user interaction. Views shouldn't really 
 contain too much logic - but they can have helpers that handle recurring 
 specific display tasks (such as your time slot issue).

 So by the presentation layers, I mean the view part.

 Jeremy Burns
 jeremybu...@me.com

 On 10 Apr 2010, at 05:33, paws_galuten wrote:



  Ah, a helper... ok. I'll research that. Where do helpers fit into the
  MVC pattern?
  What do you mean by presentation layer?

  On Apr 9, 8:17 pm, Jeremy Burns jeremybu...@me.com wrote:
  Is this for the presentation layer? If so, the controller can call the raw 
  data from the model and then the display logic probably belongs in a 
  helper?

  Jeremy Burns
  jeremybu...@me.com

  On 10 Apr 2010, at 02:00, paws_galuten wrote:

  I am learning that data manipulation needs to be done in the model.
  Fat Model, thin controller. Ok, so I'm trying to wrap my mind around
  something. Here's my example:

  Let's assume these tables:

  people (id, name)
  events (id, name, day, time)
  events_people (event_id, person_id)

  So, people HABTM events. totally cool so far.

  Now, let's say that when viewing a person I want to see all of the
  events organized into time slots based on another table in the
  database:

  times (id, day, start, end)

  There's no relationship between events and times. It's just that I
  want the event that happens on Friday at 2pm to be displayed in the
  time slot that is Friday 1pm - 4pm, for example.

  The point is, somewhere I have to cycle through the times and then
  cycle through the events and see if the time of the event is between
  start and end so I know if it should be displayed there. I guess I
  need to do data logic like that in the model, but which model? Should
  I have a method in the person model in which I also grab the data from
  the time model and then return an array with all of the display data
  neatly packaged for the view?

  Maybe this is a confusing question. I think I'm just still trying to
  understand the cakePHP conventions.

  Any ideas would be greatly appreciated.
  Thanks,
  Jason

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
  with their CakePHP related questions.

  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 email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

  To unsubscribe, reply using remove me as the subject.

  Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
  with their CakePHP related questions.

  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 email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Let's get rid of The Bakery

2010-04-10 Thread nurvzy
@predominant I'd be happy to help out as moderator, developer, or
both.   Wherever I'm more useful.

-Nick
@WebTechNick
http://www.webtechnick.com

On Apr 9, 9:03 pm, Predominant predomin...@gmail.com wrote:
 Hey all,

 Rest assured, we're discussing this problem within the development
 team to ensure the action we do take is the best for the long term.
 We apologise for the spammy comments that exist while we decide on and
 implement a solution.
 This should be resolved very soon.

 That aside, the bakery and cookbook are open projects.
 While the core team continues to work on the hundreds of tickets[1]
 that exist for the core including enhancements and defects, we do have
 trouble finding time to continually develop the associated projects
 such as the bakery.
 In the past we have welcomed development team members that worked
 exclusively on these side projects, and we'd be interested in hearing
 from anyone that would like to contribute to help keep the bakery up
 to date and functional.

 If you're not comfortable with developing, we're in need of bakery
 moderators to read through, suggest changes, and accept submissions
 for articles on the bakery.
 Again, if you are interested, please feel free to contact one of the
 core team (eg: markstory, myself, PhpNut, jose_zap or ADmad).
 You can do that here on the group, or in IRC, twitter to @cakephp too.

 In the mean time, we're fixing this spam problem as best we can!

 Cheers,

 Graham Weldon (aka. Predominant)
 e. gra...@grahamweldon.com
 p. +61 407 017 293
 w.http://grahamweldon.com

 On Apr 9, 7:37 am, jacmoe jac...@mail.dk wrote:



  It would be nice to get some feedback from someone *in* the CakePHP
  team.

  I am not interested in letting it die, but it cannot continue the way
  it does now.
  If you need any help - which I bet you do - just say the word.

  Moderation and code review of the Bakery itself - there's some strange
  glitches and bugs in the software.

  Help us to help you make it better. :)

  On Apr 6, 11:50 am, WebbedIT p...@webbedit.co.uk wrote:

   +1 for MilesJ's commentia plugin, it's not akismet by any stretch, but
   it certainly works for me.

  http://www.milesj.me/resources/script/commentia-behavior

   Blank emails using Thunderbird for me too, CTRL + U let's me see the
   HTML source and copy paste the link to the correct article, but it is
   very embarrassing.

   Paul

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
  with their CakePHP related questions.

  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 email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Manipulating Data Based on Non Related Model Data

2010-04-10 Thread Jeremy Burns
Putting as many functions and processes into the model as possible. It's also 
very useful because you can do code 
$this-RelatedModel-DistantRelatedModel-function() /code too - much easier 
than trying to run a function from 'that' controller  in 'this' controller.

Jeremy Burns
jeremybu...@me.com


On 10 Apr 2010, at 08:14, paws_galuten wrote:

 Where does the fat model come into the picture?
 
 
 On Apr 9, 9:43 pm, Jeremy Burns jeremybu...@me.com wrote:
 This could well start a storm of you're not quite right replies - but I 
 think the spirit of this answer is about right.
 
 In MVC:
 Models do all the data humping and nothing else. Models can have behaviours 
 (such as the tree behaviour).
 Controllers control how the application flows. Controllers can have 
 components that perform specific functions shared by many/all controllers. 
 Controllers talk to models to retrieve/save data, and then send it to views.
 Views do all the presentation and user interaction. Views shouldn't really 
 contain too much logic - but they can have helpers that handle recurring 
 specific display tasks (such as your time slot issue).
 
 So by the presentation layers, I mean the view part.
 
 Jeremy Burns
 jeremybu...@me.com
 
 On 10 Apr 2010, at 05:33, paws_galuten wrote:
 
 
 
 Ah, a helper... ok. I'll research that. Where do helpers fit into the
 MVC pattern?
 What do you mean by presentation layer?
 
 On Apr 9, 8:17 pm, Jeremy Burns jeremybu...@me.com wrote:
 Is this for the presentation layer? If so, the controller can call the raw 
 data from the model and then the display logic probably belongs in a 
 helper?
 
 Jeremy Burns
 jeremybu...@me.com
 
 On 10 Apr 2010, at 02:00, paws_galuten wrote:
 
 I am learning that data manipulation needs to be done in the model.
 Fat Model, thin controller. Ok, so I'm trying to wrap my mind around
 something. Here's my example:
 
 Let's assume these tables:
 
 people (id, name)
 events (id, name, day, time)
 events_people (event_id, person_id)
 
 So, people HABTM events. totally cool so far.
 
 Now, let's say that when viewing a person I want to see all of the
 events organized into time slots based on another table in the
 database:
 
 times (id, day, start, end)
 
 There's no relationship between events and times. It's just that I
 want the event that happens on Friday at 2pm to be displayed in the
 time slot that is Friday 1pm - 4pm, for example.
 
 The point is, somewhere I have to cycle through the times and then
 cycle through the events and see if the time of the event is between
 start and end so I know if it should be displayed there. I guess I
 need to do data logic like that in the model, but which model? Should
 I have a method in the person model in which I also grab the data from
 the time model and then return an array with all of the display data
 neatly packaged for the view?
 
 Maybe this is a confusing question. I think I'm just still trying to
 understand the cakePHP conventions.
 
 Any ideas would be greatly appreciated.
 Thanks,
 Jason
 
 Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
 with their CakePHP related questions.
 
 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 email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en
 
 To unsubscribe, reply using remove me as the subject.
 
 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
 with their CakePHP related questions.
 
 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 email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 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 email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


saveAll help

2010-04-10 Thread Dave
Trying to save 1 form containing 2 related models (User and Profile)
 
How do i set up white list of fields when using saveAll?
 
Using ajax so security component checking a modified form is of no use. I
need to specify what fields can be saved so firebuggers adding fields to the
form will server no purpose.
 
I only want a few fields from each to be saved so i need to set up
User.name, User.email, Profile.status, Profile.email
 
Any ideas? I see white list in the Cake Claases page but how to set it up?
 
array( User = array ( all user fileds here? ), Profile = array(all profile
fileds here?));
 
or 
 
array (User.name, User.email, Profile.status, Profile.email);
 
Not very clear on the info there but either way no matter what i try im
having no luck.
 
Thanks
 
Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Let's get rid of The Bakery

2010-04-10 Thread jacmoe
@mark and graham:
You can count me in as a moderator. :)
I have five years of moderator experience from Ogre3d.org, if that
counts.
But I cannot be a developer as I am still wet behind my CakePHP ears.

Jacob 'jacmoe' Moen

On Apr 10, 9:20 am, nurvzy nur...@gmail.com wrote:
 @predominant I'd be happy to help out as moderator, developer, or
 both.   Wherever I'm more useful.

 -Nick
 @WebTechNickhttp://www.webtechnick.com

 On Apr 9, 9:03 pm, Predominant predomin...@gmail.com wrote:

  Hey all,

  Rest assured, we're discussing this problem within the development
  team to ensure the action we do take is the best for the long term.
  We apologise for the spammy comments that exist while we decide on and
  implement a solution.
  This should be resolved very soon.

  That aside, the bakery and cookbook are open projects.
  While the core team continues to work on the hundreds of tickets[1]
  that exist for the core including enhancements and defects, we do have
  trouble finding time to continually develop the associated projects
  such as the bakery.
  In the past we have welcomed development team members that worked
  exclusively on these side projects, and we'd be interested in hearing
  from anyone that would like to contribute to help keep the bakery up
  to date and functional.

  If you're not comfortable with developing, we're in need of bakery
  moderators to read through, suggest changes, and accept submissions
  for articles on the bakery.
  Again, if you are interested, please feel free to contact one of the
  core team (eg: markstory, myself, PhpNut, jose_zap or ADmad).
  You can do that here on the group, or in IRC, twitter to @cakephp too.

  In the mean time, we're fixing this spam problem as best we can!

  Cheers,

  Graham Weldon (aka. Predominant)
  e. gra...@grahamweldon.com
  p. +61 407 017 293
  w.http://grahamweldon.com

  On Apr 9, 7:37 am, jacmoe jac...@mail.dk wrote:

   It would be nice to get some feedback from someone *in* the CakePHP
   team.

   I am not interested in letting it die, but it cannot continue the way
   it does now.
   If you need any help - which I bet you do - just say the word.

   Moderation and code review of the Bakery itself - there's some strange
   glitches and bugs in the software.

   Help us to help you make it better. :)

   On Apr 6, 11:50 am, WebbedIT p...@webbedit.co.uk wrote:

+1 for MilesJ's commentia plugin, it's not akismet by any stretch, but
it certainly works for me.

   http://www.milesj.me/resources/script/commentia-behavior

Blank emails using Thunderbird for me too, CTRL + U let's me see the
HTML source and copy paste the link to the correct article, but it is
very embarrassing.

Paul

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
   with their CakePHP related questions.

   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 email to
   cake-php+unsubscr...@googlegroups.com For more options, visit this group 
   athttp://groups.google.com/group/cake-php?hl=en



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: My App is Getting too Slow

2010-04-10 Thread Ayman Bedair
Got this error when I installed the profiler

( ! ) Fatal error: Maximum function nesting level of '100' reached,
aborting! in C:\AppServ\www\test\memphis_erp\cake\libs\folder.php on
line 239

Call Stack
#   TimeMemory  FunctionLocation
1   0.0041  135648  {main}( )   ..\index.php:0
2   4.7698  3677016 Dispatcher-dispatch( ) ..\index.php:88
3   4.9592  4902864 Dispatcher-_invoke( )  ..\dispatcher.php:194
4   4.9592  4904192 Controller-constructClasses( ) ..\dispatcher.php:207
5   5.6971  10230032Controller-loadModel( )
..\controller.php:448
6   5.6986  10231864ClassRegistry-init( )  ..\controller.php:503
7   5.7032  10349208Model-__construct( )   
..\class_registry.php:140
8   5.8036  10427176Model-__createLinks( ) ..\model.php:418
9   5.8037  10429176Model-__constructLinkedModel( )
..\model.php:609
10  5.8038  10429712ClassRegistry-init( )  ..\model.php:637
11  5.8073  10452704Model-__construct( )   
..\class_registry.php:140
12  5.9062  10464696Model-__createLinks( ) ..\model.php:418
13  5.9096  10467448Model-__constructLinkedModel( )
..\model.php:609
14  5.9096  10467984ClassRegistry-init( )  ..\model.php:637
15  5.9137  10538504Model-__construct( )   
..\class_registry.php:140
16  6.0630  10586352Model-__createLinks( ) ..\model.php:418
17  6.0635  10588352Model-__constructLinkedModel( )
..\model.php:609
18  6.0635  1058ClassRegistry-init( )  ..\model.php:637
19  6.0729  10612776Model-__construct( )   
..\class_registry.php:140
20  6.1849  10641896Model-__createLinks( ) ..\model.php:418
21  6.1850  10643896Model-__constructLinkedModel( )
..\model.php:609
22  6.1851  10644432ClassRegistry-init( )  ..\model.php:637
23  6.1890  10674584Model-__construct( )   
..\class_registry.php:140
24  6.2675  10701984Model-__createLinks( ) ..\model.php:418
25  6.2677  10703984Model-__constructLinkedModel( )
..\model.php:609
26  6.2678  10704520ClassRegistry-init( )  ..\model.php:637
27  6.2717  10736232Model-__construct( )   
..\class_registry.php:140
28  6.3996  10768352Model-__createLinks( ) ..\model.php:418
29  6.7588  10913824Model-__constructLinkedModel( )
..\model.php:609
30  6.7589  10914360ClassRegistry-init( )  ..\model.php:637
31  6.7623  10941456Model-__construct( )   
..\class_registry.php:140
32  6.8624  10962528Model-__createLinks( ) ..\model.php:418
33  6.8625  10964528Model-__constructLinkedModel( )
..\model.php:609
34  6.8626  10965064ClassRegistry-init( )  ..\model.php:637
35  6.8661  10997744Model-__construct( )   
..\class_registry.php:140
36  6.9800  11039424Model-__createLinks( ) ..\model.php:418
37  6.9801  11041424Model-__constructLinkedModel( )
..\model.php:609
38  6.9802  11041960ClassRegistry-init( )  ..\model.php:637
39  6.9837  11065152Model-__construct( )   
..\class_registry.php:140
40  7.1217  11106224Model-__createLinks( ) ..\model.php:418
41  7.1231  11108224Model-__constructLinkedModel( )
..\model.php:609
42  7.1232  11108760ClassRegistry-init( )  ..\model.php:637
43  7.1269  11133192Model-__construct( )   
..\class_registry.php:140
44  7.2092  11154360Model-__createLinks( ) ..\model.php:418
45  7.2107  11156360Model-__constructLinkedModel( )
..\model.php:609
46  7.2108  11156896ClassRegistry-init( )  ..\model.php:637
47  7.2141  11188400Model-__construct( )   
..\class_registry.php:140
48  7.3457  11231856Model-__createLinks( ) ..\model.php:418
49  7.4631  11275248Model-__constructLinkedModel( )
..\model.php:609
50  7.4632  11275784ClassRegistry-init( )  ..\model.php:637
51  7.4637  11278168Model-__construct( )   
..\class_registry.php:140
52  7.4689  11286520Model-__createLinks( ) ..\model.php:418
53  7.4708  11290272Model-__constructLinkedModel( )
..\model.php:609
54  7.4709  11290808ClassRegistry-init( )  ..\model.php:637
55  7.4743  11325808Model-__construct( )   
..\class_registry.php:140
56  7.5923  11354536Model-__createLinks( ) ..\model.php:418
57  7.5955  11356536Model-__constructLinkedModel( )
..\model.php:609
58  7.5956  11357072ClassRegistry-init( )  ..\model.php:637
59  7.5992  11385976Model-__construct( )   
..\class_registry.php:140
60  7.7042  11416408Model-__createLinks( ) ..\model.php:418
61  7.7071  11418408Model-__constructLinkedModel( )   

Re: naming convention

2010-04-10 Thread j0n4s.h4rtm...@googlemail.com
user.model = model User + var $useTable = 'adb_usres';
users_controller.php = controller UsersController
app/views/users/*

http://book.cakephp.org/view/1059/useTable
Be sure to check out the link that Jeremy provided.


On Apr 8, 7:07 pm, Miles J mileswjohn...@gmail.com wrote:
 However, you don't need a controller per model. The controller can be
 whatever you want.

 On Apr 8, 7:39 am, Jeremy Burns jeremybu...@me.com wrote:

  First convention: one message is probably enough!

  model: filename adb_usre.php, model name AdbUsre
  view directory: adb_usres
  controller: filename adb_usres_controller.php, controller name AdbUsres

  Next piece of help - read the guide - it's all 
  there:http://book.cakephp.org/view/901/CakePHP-Conventions

  Jeremy Burns
  jeremybu...@me.com

  On 8 Apr 2010, at 08:29, Master Ram wrote:

   hi..

   i have table name: adb_usres

   what to use for

   model:

   view dr:

   controller:

   please help me.

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
   with their CakePHP related questions.

   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 email to
   cake-php+unsubscr...@googlegroups.com For more options, visit this group 
   athttp://groups.google.com/group/cake-php?hl=en

   To unsubscribe, reply using remove me as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Any popular Image Components being used that are better than the rest?

2010-04-10 Thread j0n4s.h4rtm...@googlemail.com
Anyone of you considered using Gravatar + Flickr instead of local
solutions and if happy with either of them?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: My App is Getting too Slow

2010-04-10 Thread Jon Bennett
 Got this error when I installed the profiler

 ( ! ) Fatal error: Maximum function nesting level of '100' reached,
 aborting! in C:\AppServ\www\test\memphis_erp\cake\libs\folder.php on
 line 239

Are your tmp dirs definitely 777?
From looking at the API, __createLinks() creates the associated model
objects - do you have an huge number of models/associations? Could
there be something unusual about how they are set up?

Cheers,

J


-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: My App is Getting too Slow

2010-04-10 Thread Jon Bennett
 Are your tmp dirs definitely 777?
 From looking at the API, __createLinks() creates the associated model
 objects - do you have an huge number of models/associations? Could
 there be something unusual about how they are set up?

Do you have any Behaviours or Plugins that could be recursively
getting in a mess with their associations?

J


-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: My App is Getting too Slow

2010-04-10 Thread Ayman Bedair

Hey Jon...

Actually I am running this on a windows server so the folders should
be writable with no problems.

I only have the Containable Behavior on all the models (AppModel) and
Tree in both ARO and ACO (ACL) models. I believe this is not a
problem.

Here below is an example of the associated models to the this
controller's main model.

var $hasOne = array(MODEL);
var $hasMany =
array(MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL=array(order=MODEL.created
ASC));
var $belongsTo = array(
'MODEL', MODEL', 'MODEL', 'MODEL', 'MODEL',
'Source' = array(
'className' = 'Source',
'foreignKey' = 'source_id'
),
'SubSource' = array(
'className' = 'Source',
'foreignKey' = 'sub_source_id'
),
'Staff' = array(
'className' = 'Staff',
'foreignKey' = 'staff_id'
),
'DelegatedTo' = array(
'className' = 'Staff',
'foreignKey' = 'delegated_to'
) );

So as you can see there a a number of few models attached. And I am
still expecting this to increase... but this shouldn't be a problem
too cuz I am using containable

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: My App is Getting too Slow

2010-04-10 Thread Jon Bennett
Hi Ayman,

 var $hasOne = array(MODEL);

^ looks ok

 var $hasMany =
 array(MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL,MODEL=array(order=MODEL.created
 ASC));

^ looks ok

        var $belongsTo = array(
                                'MODEL', MODEL', 'MODEL', 'MODEL', 'MODEL',
                                'Source' = array(
                                'className' = 'Source',
                                'foreignKey' = 'source_id'
                                ),
                                'SubSource' = array(
                                'className' = 'Source',
                                'foreignKey' = 'sub_source_id'
                                ),
                'Staff' = array(
                                'className' = 'Staff',
                                'foreignKey' = 'staff_id'
                                ),
                'DelegatedTo' = array(
                                'className' = 'Staff',
                                'foreignKey' = 'delegated_to'
                                ) );


^ Looks wrong - you have MODEL MODEL MODEL then source, is that
actually what you have?

 So as you can see there a a number of few models attached. And I am
 still expecting this to increase... but this shouldn't be a problem
 too cuz I am using containable

No, the models are all connected when the app is instanciated,
containable only affects things when you're querying the database.

Remove some associations to see if that fixes it. If it does, rethink
you're data model or look into the lazy loading behaviour.

Cheers,

Jon

-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: My App is Getting too Slow

2010-04-10 Thread Jon Bennett
 ^ Looks wrong - you have MODEL MODEL MODEL then source, is that
 actually what you have?

Ignore that - mistook 'Source' for an array param, not a model name.

J

-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Dependent models

2010-04-10 Thread Mateusz Kaczanowski
Hi guys,

In CakePHP we delete related records by dependency in model. Which way us
better

1. Set up CASCADE in innodb mysql database
2. Use dependent in cakePHP model

Better - I mean faster , safer .

Thanks for answers

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


my translations not submitted

2010-04-10 Thread islam4hak
i have translate about 8 topics on the book to arabic but they dont
submitted i was think that i did something wrong on the HTML maybe but
then i resend my translation with no any thing wrong on it
and i translate about 6 new topics but nothing yet submitted so what i
did wrong
i try to email
d...@cakephp.org but it's get me
Delivery Status Notification (Failure)

i can write the message but i dont think it help :(


so what are going on
please Note i have 2 successful translations with no any problems
i hope someone have answer !!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Js helper and multiple effects

2010-04-10 Thread Cylindric
I have the same question, did you get anywhere with this?

On Mar 25, 6:32 am, Jeremy Burns jeremybu...@me.com wrote:
 I'm using the Js helper in 1.3 for Ajax pagination, adding a fadeOut 
 fadeIn effect to my content div.

 Can I produce two simultaneous effects? For example, can I fade out my
 content div and show my progress/spinner div, then hide my progress/
 spinner div and fade in my content div?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Js helper and multiple effects

2010-04-10 Thread Jeremy Burns
None at all I'm afraid - but would appreciate an answer.

Jeremy Burns
jeremybu...@me.com


On 10 Apr 2010, at 17:47, Cylindric wrote:

 I have the same question, did you get anywhere with this?
 
 On Mar 25, 6:32 am, Jeremy Burns jeremybu...@me.com wrote:
 I'm using the Js helper in 1.3 for Ajax pagination, adding a fadeOut 
 fadeIn effect to my content div.
 
 Can I produce two simultaneous effects? For example, can I fade out my
 content div and show my progress/spinner div, then hide my progress/
 spinner div and fade in my content div?
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 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 email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en
 
 To unsubscribe, reply using remove me as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: My App is Getting too Slow

2010-04-10 Thread AD7six


On Apr 10, 1:04 pm, Ayman Bedair ayma...@gmail.com wrote:
 Got this error when I installed the profiler

 ( ! ) Fatal error: Maximum function nesting level of '100' reached,
 aborting! in C:\AppServ\www\test\memphis_erp\cake\libs\folder.php on
 line 239

Ayman,

Xdebug isn't just a profiler. One of the things it does is prevent
loops by imposing a max nesting level.
http://xdebug.org/docs/basic

Although hitting this limit (immediately) most likely hints at part of
the cause of your problems - why don't you just increase the limit (to
say 200) so you can get a profile - since your app worked before you
obviously don't have an infinite loop in your code - you've simply got
a very-nested loop in your code. And are currently getting distracted
by a relevant - but not immediately so - detail.

Hower, here's what you stack trace tells me:

 2   4.7698  3677016 Dispatcher-dispatch( )  ..\index.php:88

It took 4.7 seconds to get to line 88 of index.php.
http://github.com/cakephp/cakephp1x/blob/master/app/webroot/index.php#L88
That's ALOT of time - and isn't dependent on your app code. it means
you have some kind of setup problem.

 89  8.6338  11936400Model-schema( ) ..\model.php:753

It took a further 4 seconds before not-completing instantiating your
model network. That's also a looong time.

When you finally get a profile - you'll know more details where to
look.

hth,

AD
PS Use real names, and real (abbreviated where possible) code. You
don't help anyone pasting erroneous made up code

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Trigger renderElement on Ajax complete

2010-04-10 Thread Jonas
Hello,

I have a pair of ajax calls made when browsing which day a user wish
to choose (+1 day, -1 day)
On the complete call I want to render the buttons again, since they
can't go pass a certain date and not further back than today's date.
Can I make a renderElement call somehow on the complete call? It only
seems to allow Javascript functions but perhaps there is a way anyway?

Thanks!

/Jonas

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: My App is Getting too Slow

2010-04-10 Thread Jon Bennett
 PS Use real names, and real (abbreviated where possible) code. You
 don't help anyone pasting erroneous made up code

Certainly not me Andy :p

-- 
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Out of memory error for every page - but was fixed when I logged out?

2010-04-10 Thread Matthew Dunham
Hi,

I was working on my admin area the other day when all of a sudden my
site white screened for every page on me. I took a look at the error
long and this was the message:

Allowed memory size of 33554432 bytes exhausted (tried to allocate
40961 bytes) in /usr/share/cakephp/cake/libs/view/view.php on line 663

For reference, aforementioned line is quite simply ob_start();.

In an attempt to debug I noticed that anything I echoed in the
controller would come out just before the error.

I was trying various pages on my site, none of them worked but as soon
as I tried the logout page the whole site was fine again. I've
subsquently logged in and things are fine at the moment.

Have I found a memory leak in Auth? Or have I made some sort of common
mistake? I onyl ound one result online for the same error and it was
never answered.

I'll happily post parts of my implementation if you think that will
help.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Out of memory error for every page - but was fixed when I logged out?

2010-04-10 Thread Matthew Dunham
Being the douche that I am, I have worked out what triggered the
error. To trigger the error I misspelt the second parameter in a $this-
Session-setFlash() call.

eg:
$this-Session-setFlash('Invalid URL.', 'admni', array('class' =
'bad'));

The only way to continue on the site after this was by calling the
logout action.

I'm not sure if this should be reported as a bug or what? Kinda new to
this.

On Apr 10, 8:01 pm, Matthew Dunham m...@umpcmedia.com wrote:
 Hi,

 I was working on my admin area the other day when all of a sudden my
 site white screened for every page on me. I took a look at the error
 long and this was the message:

 Allowed memory size of 33554432 bytes exhausted (tried to allocate
 40961 bytes) in /usr/share/cakephp/cake/libs/view/view.php on line 663

 For reference, aforementioned line is quite simply ob_start();.

 In an attempt to debug I noticed that anything I echoed in the
 controller would come out just before the error.

 I was trying various pages on my site, none of them worked but as soon
 as I tried the logout page the whole site was fine again. I've
 subsquently logged in and things are fine at the moment.

 Have I found a memory leak in Auth? Or have I made some sort of common
 mistake? I onyl ound one result online for the same error and it was
 never answered.

 I'll happily post parts of my implementation if you think that will
 help.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Generating diagram of my projekt?

2010-04-10 Thread mivogt-LU
hi there,

I did my first cake project so far and it works (well - most of it...)
Now I want to do some documentation adding the database-model and the
UML diagram as pictures.

Are there any tools to automate it as much as possible?
ER and UML will shure be very similar as each Class means a table in
database, with some linking tables in addition for the ER - having the
UML with same table names and culum names as attributes and always the
CRUD methods in UML with some custom methods in additon.

So if there is any autmatic tool to do most of work it would be fine -
otherwise I ll have to start with argoUML, DIA and all the other stuff
that is free and useful to draw it myselfe.

Thanks in advance

Michael

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


[no subject]

2010-04-10 Thread Ronald Chaplin
http://HoratioPaulino3145.co.cc

-- 
Thanks,
Ron Chaplin
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Tenacious, Experienced PHP Developer

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


[RESOLVED] Re: Problem running shell task with DB access on HostGator

2010-04-10 Thread FrederickD
Fixed it with a some help from cakebaker at
http://cakebaker.42dh.com/2007/05/07/writing-a-custom-cakephp-console-script/comment-page-1/#comment-156432

The suggestion was to remove the $uses statement and replace with
App:import and then a ClassRegistry in the function.

This change, plus re-reading the instructions from
http://bakery.cakephp.org/articles/view/updated-swiftmailer-4-xx-component-with-attachments-and-plugins
on where to put the shell script and task, enabled the shell script to
work from SSH as well as in cron. (Turns out you really do need to put
the shell task in /app/vendors/shell. For some reason I had it in /
vendors/shell.)

The final SSH and cron command looks like this for HostGator:

php /home/USER NAME/public_html/cake/console/cake.php -app /home/USER
NAME/public_html/app reminders lof

I hope that this helps someone else in the future. Shell scripts and
tasks are really cool.

On Apr 8, 3:33 pm, FrederickD manzanillo.engl...@gmail.com wrote:
 I was successfully able to create a shell with a task that contains DB
 access and get it to run on DreamHost in either SSH or cron. However,
 our project lead chose to host the site on HostGator. As you know,
 each hosting service differs ever so slightly in their implementation.

 At this point I can run my test shell that has no DB access perfectly
 on HostGator. The syntax for it is much different than DreamHost. Here
 is the command:

 php /home/USER NAME/public_html/cake/console/cake.php -app /home/USER
 NAME/public_html/cake/app test main

 The output is as expected:

 Welcome to CakePHP v1.2.1.8004 Console
 ---
 App : app
 Path: /home/USER NAME/public_html/cake/app
 ---
 Please specify which reminder task to run; LOF or Other.

 Now, when I try to use a shell with a task that has a $uses statement
 I get an error like this:

 php /home/USER NAME/public_html/cake/console/cake.php -app /home/USER
 NAME/public_html/cake/app reminders main
 Error: Missing Database Connection. Try 'cake bake'

 The shell with the function I am trying to execute looks like this:

 ?php

 class RemindersShell extends Shell {
         var $components = array('SwiftMailer');
         var $tasks = array('SwiftMailer');

         var $uses = array('Repairorder');

         function main() {
                 echo Please specify which reminder task to run; LOF or 
 Other.\n\n;
         }

 }

 ?

 The shell is the same as the test shell except with $components,
 $tasks, and $uses statements. This works fine on DreamHost that has a
 CLI of PHP4. To make it work I did need to change the cake console
 file to force PHP5 use, as per this 
 articlehttp://www.milesj.me/blog/read/83/Setting-Up-Cron-Jobs-With-Cake-Shells
 and DreamHost support.

 Can anyone spot what is the difference with HostGator so that my shell
 with a DB reference does not execute in either SSH or cron? Do you
 think I need to change the cake console file? It appears that
 HostGator is running PHP5, but I am not sure about the CLI. Thank you
 in advance for your help.

 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
 their CakePHP related questions.

 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 email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Advanced Set up

2010-04-10 Thread Dave
I am trying to run multiple sites off 1 cake lib so i have:
 
public_html/
libs/
1.2.6/
1.3/
site1/
app/
site2/
app/
 
with if (!defined('ROOT')) {
  define('ROOT', dirname(dirname(dirname(__FILE__;
  //define('ROOT', DS.'public_html'.DS.'site1');
 }
/**
 * The actual directory name for the app.
 *
 */
 if (!defined('APP_DIR')) {
  //define('APP_DIR', basename(dirname(dirname(__FILE__;
  define ('APP_DIR', 'app');
 }
/**
 * The absolute path to the cake directory, WITHOUT a trailing DS.
 *
 */
 if (!defined('CAKE_CORE_INCLUDE_PATH')) {
  //define('CAKE_CORE_INCLUDE_PATH', ROOT);

  define('CAKE_CORE_INCLUDE_PATH', '/home4/public_html/libs/1.2.6');

 }

This allows me to access site1.com/

But all the links have site1.com/site1/{action}

Can someone point out where I went wrong?

Thanks
 
Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Advanced Set up

2010-04-10 Thread nurvzy
I do something similar, except I keep my cake libraries out of
public_html, and you should as well.

Do you have the .htaccess files setup correctly in site1?   What I
ended up doing was the same type of setup (except I move my cake core
out of public_html), but then addon domains rooted at the site1 and
site2.  With the standard .htaccess that is given to you by the cake
library (in same directory as app) should be enough to get what you
want.

Hope that helps,
Nick

On Apr 10, 3:55 pm, Dave make.cake.b...@gmail.com wrote:
 I am trying to run multiple sites off 1 cake lib so i have:

 public_html/
                 libs/
                     1.2.6/
                     1.3/
                 site1/
                         app/
                 site2/
                         app/

 with if (!defined('ROOT')) {
   define('ROOT', dirname(dirname(dirname(__FILE__;
   //define('ROOT', DS.'public_html'.DS.'site1');
  }
 /**
  * The actual directory name for the app.
  *
  */
  if (!defined('APP_DIR')) {
   //define('APP_DIR', basename(dirname(dirname(__FILE__;
   define ('APP_DIR', 'app');
  }
 /**
  * The absolute path to the cake directory, WITHOUT a trailing DS.
  *
  */
  if (!defined('CAKE_CORE_INCLUDE_PATH')) {
   //define('CAKE_CORE_INCLUDE_PATH', ROOT);

   define('CAKE_CORE_INCLUDE_PATH', '/home4/public_html/libs/1.2.6');

  }

 This allows me to access site1.com/

 But all the links have site1.com/site1/{action}

 Can someone point out where I went wrong?

 Thanks

 Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


RE: Advanced Set up

2010-04-10 Thread Dave
Ok I will move the cake libs outside.

What do you mean by set up right for site1?

My problem I think comes from the fact my hosting company sets public_html
as the main site, addon domains each their own folder so I have my
public_html htaccess file directing all traffic to site 1 to site1 folder
Site2 folder is add on so no directing thru htaccess needed (extra config I
mean) 

But based on my index.php info below all my links for site1 end up with
site1 in the url so www.site.com/about becomes www.site.com/site1/about

Will move the libs first then see where I stand.

Thanks,

Dave

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of nurvzy
Sent: April-10-10 9:27 PM
To: CakePHP
Subject: Re: Advanced Set up

I do something similar, except I keep my cake libraries out of public_html,
and you should as well.

Do you have the .htaccess files setup correctly in site1?   What I
ended up doing was the same type of setup (except I move my cake core out of
public_html), but then addon domains rooted at the site1 and site2.  With
the standard .htaccess that is given to you by the cake library (in same
directory as app) should be enough to get what you want.

Hope that helps,
Nick

On Apr 10, 3:55 pm, Dave make.cake.b...@gmail.com wrote:
 I am trying to run multiple sites off 1 cake lib so i have:

 public_html/
                 libs/
                     1.2.6/
                     1.3/
                 site1/
                         app/
                 site2/
                         app/

 with if (!defined('ROOT')) {
   define('ROOT', dirname(dirname(dirname(__FILE__;
   //define('ROOT', DS.'public_html'.DS.'site1');
  }
 /**
  * The actual directory name for the app.
  *
  */
  if (!defined('APP_DIR')) {
   //define('APP_DIR', basename(dirname(dirname(__FILE__;
   define ('APP_DIR', 'app');
  }
 /**
  * The absolute path to the cake directory, WITHOUT a trailing DS.
  *
  */
  if (!defined('CAKE_CORE_INCLUDE_PATH')) {
   //define('CAKE_CORE_INCLUDE_PATH', ROOT);

   define('CAKE_CORE_INCLUDE_PATH', '/home4/public_html/libs/1.2.6');

  }

 This allows me to access site1.com/

 But all the links have site1.com/site1/{action}

 Can someone point out where I went wrong?

 Thanks

 Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group 
cake-php+at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re:

2010-04-10 Thread Jonathon Musters
spam

On Sat, Apr 10, 2010 at 5:32 PM, Ronald Chaplin ron.g.chap...@gmail.comwrote:

 http://HoratioPaulino3145.co.cc

 --
 Thanks,
 Ron Chaplin
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Tenacious, Experienced PHP Developer

 Check out the new CakePHP Questions site http://cakeqs.org and help others
 with their CakePHP related questions.

 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 email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en

 To unsubscribe, reply using remove me as the subject.


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Dependent models

2010-04-10 Thread Lucca Mordente
The faster is using cascade, because it handled at a lower level than
the application level.
However, it's safer to delete related model through dependent,
specially when this model implements a beforeDelete or afterDelete
callbacks (do not forhet the attached behaviors). When it's not
handled by the app, these callbacks won't be called.

Hope this help!

On 10 abr, 13:45, Mateusz Kaczanowski kangu...@gmail.com wrote:
 Hi guys,

 In CakePHP we delete related records by dependency in model. Which way us
 better

 1. Set up CASCADE in innodb mysql database
 2. Use dependent in cakePHP model

 Better - I mean faster , safer .

 Thanks for answers

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using remove me as the subject.


Re: Js helper and multiple effects

2010-04-10 Thread mark_story
Why would you not be able to? just write the code to do it. Depending
the Js library you may have to do some trickery to get simultaneous
animation.  http://book.cakephp.org/view/1600/Ajax-Pagination shows
how to do one effect.  Just appending two effect methods together
should create simultaneous animation depending on the library.

Something like:

$before =  $this-Js-get('#busy-indicator')-effect('fadeIn',
array('buffer' = false));
$before .= $this-Js-get('#content')-effect('fadeOut',
array('buffer' = false));

$this-Paginator-options(array(
'before' = $before
));

Seems like it should work.

-Mark

On Apr 10, 12:48 pm, Jeremy Burns jeremybu...@me.com wrote:
 None at all I'm afraid - but would appreciate an answer.

 Jeremy Burns
 jeremybu...@me.com

 On 10 Apr 2010, at 17:47, Cylindric wrote:



  I have the same question, did you get anywhere with this?

  On Mar 25, 6:32 am, Jeremy Burns jeremybu...@me.com wrote:
  I'm using the Js helper in 1.3 for Ajax pagination, adding a fadeOut 
  fadeIn effect to my content div.

  Can I produce two simultaneous effects? For example, can I fade out my
  content div and show my progress/spinner div, then hide my progress/
  spinner div and fade in my content div?

  Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
  with their CakePHP related questions.

  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 email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

  To unsubscribe, reply using remove me as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Js helper and multiple effects

2010-04-10 Thread Jeremy Burns
Thanks - I'll give that a go.

Jeremy Burns
jeremybu...@me.com
On 11 Apr 2010, at 05:09, mark_story wrote:

 Why would you not be able to? just write the code to do it. Depending
 the Js library you may have to do some trickery to get simultaneous
 animation.  http://book.cakephp.org/view/1600/Ajax-Pagination shows
 how to do one effect.  Just appending two effect methods together
 should create simultaneous animation depending on the library.
 
 Something like:
 
 $before =  $this-Js-get('#busy-indicator')-effect('fadeIn',
 array('buffer' = false));
 $before .= $this-Js-get('#content')-effect('fadeOut',
 array('buffer' = false));
 
 $this-Paginator-options(array(
 'before' = $before
 ));
 
 Seems like it should work.
 
 -Mark
 
 On Apr 10, 12:48 pm, Jeremy Burns jeremybu...@me.com wrote:
 None at all I'm afraid - but would appreciate an answer.
 
 Jeremy Burns
 jeremybu...@me.com
 
 On 10 Apr 2010, at 17:47, Cylindric wrote:
 
 
 
 I have the same question, did you get anywhere with this?
 
 On Mar 25, 6:32 am, Jeremy Burns jeremybu...@me.com wrote:
 I'm using the Js helper in 1.3 for Ajax pagination, adding a fadeOut 
 fadeIn effect to my content div.
 
 Can I produce two simultaneous effects? For example, can I fade out my
 content div and show my progress/spinner div, then hide my progress/
 spinner div and fade in my content div?
 
 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
 with their CakePHP related questions.
 
 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 email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en
 
 To unsubscribe, reply using remove me as the subject.
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
 
 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 email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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 email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en