Welcome Guest, Not a member yet? Register   Sign In
I want to smash my face in with a rusty crowbar (really weird bug)
#1

[eluser]richthegeek[/eluser]
Hi

So i'm migrating a site from my dev localhost (PHP/MYSQL 5) to the live server (v 4 on all Angry) and I'm getting a really screwed up error.

Basically I have a "staff" folder in the controllers, and a "customer" controller (http://www.richardlyon.co.uk/customer.txt) which has "all" and "view" as its two methods (besides index and constructor).

However, when I go to "~/staff/customer/all" it *actually* goes to ~/staff/customer/view/staff/navigation

The staff/navigation part is a little wtf, but in my controller I have this:
Code:
$this->viewdata->add( "header", "navigation", $this->load->view( "staff/navigation", '', true ) );
        $this->viewdata->add( "header", "user", $this->authorise->get_current_user() );

The "viewdata" model is a simple class () that manages the viewdata across several methods and even from within models when required (its a complex site in other controllers). So the "staff/navigation" is coming from the view that I call in the controller. Tell me that makes sense??

Commenting it out solves it, but obv that farks it over in other ways (no navigation, for example).

Any idea why this might be occuring??http://www.richardlyon.co.uk/viewdata.txt
#2

[eluser]richthegeek[/eluser]
Thought it might be worth nothing that this method doesnt cause problems *anywhere* else?
#3

[eluser]sophistry[/eluser]
[quote author="richthegeek" date="1251780539"]
However, when I go to "~/staff/customer/all" it *actually* goes to ~/staff/customer/view/staff/navigation
[/quote]

that sounds like a route problem to me.
#4

[eluser]richthegeek[/eluser]
that answer would make sense if the staff/navigation bit was going anywhere near the routes class, or if the site didnt already work on a PHP5 server.
#5

[eluser]sophistry[/eluser]
oh. i see now. just change the name of your method so it is not "view"
#6

[eluser]garymardell[/eluser]
Posting the viewdata class may prove useful.

didnt see above, as they said

http://ellislab.com/codeigniter/user-gui...names.html

in php 4 view is reserved for codeigniter.




Theme © iAndrew 2016 - Forum software by © MyBB