Hi Petrisor,

That is great it's working, because it's a compatibility issue might
even be good to log a ticket or write a patch for it.. I might try and
do that.

kind regards,

Leigh

On Nov 27, 7:25 am, Petrisor Buga <petri...@theworkshop.ro> wrote:
> Thx Leigh,
> After a few days starring into this problem i finally nailed it down
> after comparing different aspects between local server and online
> one.It looks like the problem was endeed in viewPath!
> using this 
> tut.http://bakery.cakephp.org/articles/rtconner/2007/06/29/advanced-pagin...
> and going with the first phrase form 
> herehttp://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#ajax-pa...
>
> my original piece of code was:if($this->RequestHandler->isAjax()) {
>           $this->viewPath = 'elements';             $this->render('paging');  
>                 }
>
> and it was looking for the file: /home/independ/public_html/film/app/
> View/elements/paging.ctp , but using the default cakephp folder
> structure, my pagination .ctp file was laying in the /app/View/
> Elements/ folder (notice the big E on "Elements")
> i thought that cakephp would look for the file in this folder, like
> the controller looks automatically in the ../View/Movies for the
> MoviesController, but instead it was looking for the "elements" folder
> (and because "Elements" is different from "elements" on *nix sytems of
> course it would not work)
> the fix was to just modify $this->viewPath = 'Elements'; and for the
> future to specify THE EXACT location of the file!
> Thanks again,Petrisor
>
> On Nov 25, 9:31 am, leigh <phpnote...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hello Petrisor,
>
> > Check $this->viewPath and $this->view in your controller on the ajax
> > request to see if they're pointing to  a view file that exists.
>
> > Also are you using cake 2.0?
>
> > Kind regards,
>
> > Leigh
>
> > On Nov 24, 7:08 pm, Petrisor Buga <petri...@theworkshop.ro> wrote:
>
> > > Hy, i've developed a project locally using MAMP on a mac, after i
> > > moved it online the links generated automatically by cakephp are not
> > > working anymore, more precisely i get "500 internal server error" on
> > > the ajax-get request and on the response i get:
>
> > > Error: The view for MoviesController::index() was not found.
> > > Error: Confirm you have created the file: /home/independ/public_html/
> > > film/app/View/elements/paging.ctp
>
> > > but the files are there and working, if i comment/remove the 
> > > $this->Js->writeBuffer(); line (and also remove the ajax functionality) 
> > > the
>
> > > links are working ok.
>
> > > i'm guessing it's something related to .htaccess files or file
> > > permissions somehow but i can't seem to figure them out!
> > > i tried on 3 different servers a vps, a sharedhost (this is the one
> > > that needs to work), a linux box and on all it acts the same, only on
> > > my mac works :|.
>
> > > i have also done another basic cakephp application starting from
> > > scratch that has ajax pagination and no success either :( works
> > > locally but not online.
>
> > > Thanks for taking time reading my problem!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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

Reply via email to