Friday, January 30, 2009

Re: newb question: autoRendering a view, even if I specify autoRender=false!

Dr. Loboto,
Thanks; makes sense about autoRender=false. I removed it.

here's what the message displays when debug is on:
___
"Missing View
Error: The view for ReviewsController::deleteSection() was not found.

Error: Confirm you have created the file: /Library/WebServer/Documents/
spr4/app/views/elements/reviews/create/40.ctp

Notice: If you want to customize this error message, create app/views/
errors/missing_view.ctp"
-----
what I am doing is displaying a view (spr4/app/views/elements/reviews/
create/) on a specific record id (40)
I'm then clicking on a link to delete a line item from that view,
which fires the ajax script, and then the action called deleteSection.
I pass in the section ID to be deleted (187 in this case), and the
delete is completed successfully.
I then want to refresh the original view, without showing the item
that was just deleted. That is the point at which I receive this
message.

Thanks for any help!


On Jan 30, 3:49 am, "Dr. Loboto" <drLob...@gmail.com> wrote:
> 1. Turn debug ON and read complete error messages.
> 2. autoRender needs to be false ONLY if you do not render anything at
> this action. As you call $this->render() explicitly, you should not
> touch $this->autoRender.
> 3. It is unclear what do you want to achieve. In normal flow render
> occurs just after action. In your case too.
>
> On Jan 30, 5:44 am, mark <markman...@gmail.com> wrote:
>
> > Basic question, hopefully with a simple answer. I've got a view that I
> > *do* want to re-render after an ajax delete. The delete works properly
> > and the view attempts to re-render, but instead displays the dreaded
> > "requested address was not found" message (basically acting as if it's
> > trying to render a page automatically). This is odd because I specify
> > autoRender=false. It seems like that is not working properly
> > Here's the controller:
> > I'm passing values to the controller appropriately(confirmed
> > already): /reviews/deleteSection/40/187
>
> >         function deleteSection($id = null, $sectionID = null)
> >         {
> >                 $this->Section->del($sectionID);
> >                 $this->autoRender=false;
> >                 $this->layout = 'ajax';
> >                 $this->render("../elements/reviews/create/".$id);
> >         }
> > The create/40 view attempts to reload, but then I get the message:
> >  "Not Found
> >   Error: The requested address '/reviews/deleteSection/40/187' was not
> > found on this server."
>
> > I thought I understood about rendering, but maybe I'm missing
> > something. Can anyone help? Thanks in advance! I'm still learning!

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

Re: Model::saveAll() fails with validate = first and belongsTo associations

This has been fixed in the svn head. :)

-Mark

On Jan 30, 7:11 am, Papagurana <maas.tors...@googlemail.com> wrote:
> Hello,
>
> I recently updated from RC2 to 1.2.1.8004 and I've got problems when
> doing a saveAll with two new datasets.
>
> Example:
> 1. Model Profile belongsTo User
> 2. ProfileController::add() => $this->Profile->saveAll($this->data,
> array('validate' => 'first'))
>
> The Controller::data is something like:
> array(
>     'Profile' => array(
>         'salutation_id' => 'xx'
>     ),
>     'User' => array(
>         'username' => 'papagurana',
>         'password' => 'xxxxx'
>     )
> );
>
> In the Model::saveAll method in line 1516 the belongsTo association
> will be removed after the first loop iteration. That could not be
> correct, because line 1514 ($this->__save(...)) will not save the
> belongsTo association but only validates the belongsTo model (The user
> model in this case).
>
> This problem can be easily fixed with:
> if($options['validate'] != 'first') {
>     unset($data[$association]);
>
> }
>
> This problem only occurs if both datasets are new and must be inserted
> in the database and the foreign key is not already set.
>
> Greetings and sorry for my english
>
> papagurana
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: __mergeHasMany causing EXTREMELY slow data retrieval

On Jan 30, 5:47 pm, Dan <grip...@gmail.com> wrote:
> No one has feedback on this? It seems like a MAJOR issue if you can't
> load more than a few thousand rows from "has many" relationship tables.

IMO, quite simply you're using the wrong approach. check the group for
csv dumps and the likes.

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

Re: Problem with App::import with classes containing a dot.

Any idea ?

App::import('Vendor',null, true, array('wshelper'),
'IPReflectionClass.class.php');

Returns True ; but then

$refl = new IPReflectionClass('test'); cause an error :

Fatal error: Class 'IPReflectionClass' not found in /Applications/
xampp/xamppfiles/htdocs/cakebase/app/controllers/
service_controller.php on line 18

If anyone have an idea ...

Thanks !
Xav

On 29 jan, 15:25, Xav <xstde...@gmail.com> wrote:
> Hi,
> The following code returns FALSE and don't load the Class :
>
> App::import('Vendor', 'IPReflectionClass', array('file' =>
> 'wshelper'.DS.'lib'.DS.'soap'.DS.'IPReflectionClass.class.php'));
>
> when I want to load the class in the following directory :
> .../vendors/wshelper/lib/soap/IPReflectionClass.class.php
>
> So, what's wrong ?
>
> Thx,
> Xav
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: __mergeHasMany causing EXTREMELY slow data retrieval

No one has feedback on this? It seems like a MAJOR issue if you can't
load more than a few thousand rows from "has many" relationship tables.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

$scaffold and bake don't match up

I am new to cakephp and I used the scaffolding and then decided to
bake my views and controllers. I have some Associations setup that
showed up in the views when using scaffolding but don't show up after
baking the views. Did I do something wrong or is there not a way to
generate the scaffolding as it appears? Thanks any help would be
appreciated. Thanks.

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

Re: for create home.ctp page

Read the cookbook, and then run 'cake bake' to build your skeleton
views is the easiest thing: http://book.cakephp.org/view/108/The-CakePHP-Console


On Jan 29, 11:18 pm, sagu <sarvaiya.sag...@gmail.com> wrote:
> Hey group  I am just beginner with cake php framework..
> So how to create .ctp  file
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---