CodeIgniter Forums
Help!! I am getting an error I can not understand trying to load a view... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Help!! I am getting an error I can not understand trying to load a view... (/showthread.php?tid=19076)

Pages: 1 2


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]nealumney[/eluser]
Hi folks,

Not use why but I am getting this error:

"Unable to load the requested file: noitemfound.php"

This happens after the following code:

Code:
if (!$items = $this->item->getitemsforsale($this->input->post('itemid')) )
        {
            $this->load->view('noitemfound');
        }

The 'noitemfound.php' file is in the application views directory and actually contains no php at all and is just a polite notification that the user needs to refine their search criteria. I am sure you need more information to help, but not sure what more you need. I should point out that the message is a response to an ajax call.

Thanks.

Neal


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]TheFuzzy0ne[/eluser]
Check the case of the file (it should be all lowercase).
Check the permissions of the file.
Check that Darth Vader is not in the vicinity playing Jedi mind tricks on you.


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]nealumney[/eluser]
There are times when a on man feels like a complete fool... I am talking about me! I could not see the wood for the trees... and yes the case for the view was not that used in the load request... how dumb am I!!

I am sure Darth Vader had something to do with it though!!


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]Dave Blencowe[/eluser]
For simplicities sake I always find it is easier to user lower-case alphanumeric names for all my files. If a space is needed then I substitute it with an underscore. Having a good practice like this will prevent errors, make it easier to find files and also make your finished product look much more polished.


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]TheFuzzy0ne[/eluser]
This should be made more clear in the user guide.

Slightly off-topic: The PHP Style Guide is worth a read - http://ellislab.com/codeigniter/user-guide/general/styleguide.html


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]Dam1an[/eluser]
Love the implication of anything going wrong being Darth Vadars fault
I personally prefer to blame it on the misalignment of the moon Wink


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]wiredesignz[/eluser]
You know you're a nerd if bugs in your code are blamed on Star Wars characters. Tongue


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]TheFuzzy0ne[/eluser]
You know you're a geek if you start calling people nerds for blaming bugs in their code on Star Wars characters.


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]wiredesignz[/eluser]
Yes. Wink

EDIT:
But I blame Derek Jones or Derek Allard for the bugs in my code.


Help!! I am getting an error I can not understand trying to load a view... - El Forum - 05-27-2009

[eluser]TheFuzzy0ne[/eluser]
You mean OB-wan Kenobi and Luke Skywalker?