Wednesday, November 26, 2008

Re: With Debug = 0, Ajax effects not working...

In case anyone else needs it, this was solved by adding

$this->autoRender=null;

to the delete action in the controller. Still not sure why it gave a
404 error only in debug 0.

SF

On Nov 21, 12:00 pm, SF <steven.franci...@gmail.com> wrote:
> I have seen a few postings about this but none seemed to ever be
> resolved. In my app, if I set thedebug = 0the following doesn't
> work.
>
> echo '<li id="Car'.$c['id'].'">';
>
> echo '<span class="rightactions">';
>
> echo $ajax->link('Remove', '/lots/removecar/'.$lot['Lot']['id'].'/'.$c
> ['id'], array('class'=>'action delete','success'=>'Effect.Fade
> (\'Car' . $c['id'] . '\');'), 'Are you sure you want to remove this
> car from this lot?', false);
>
> echo '</span>';
>
> echo $c['Make].' '.$s['vin'];
>
> echo '</li>';
>
> (Entities changed to protect the innocent.)
>
> The odd thing is that if i set it toDebug >0it works as its supposed
> to.
>
> Looking at the call in Firebug, I see that atdebug 0the call gets a
> 404 error that the /lots/removecar page was not found, whereas withdebug > 0it works fine.
>
> Any idea on how to fix this?
>
> Thanks,
>
> SF
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

No comments: