Page disapears after login - cache problem? |
[eluser]bena[/eluser]
Hi everyone, I'm quite new to CI and it's been the answer to my prayers so far, but I've just come across a problem I've no idea how to fix because, as far as I'm aware, I'm doing no caching at all anywhere in the site. The site is here - it's been working lovely so far up until I started to develop the admin side. What's happening is, everything is OK up until I login; after I enter the username and password I get redirected to the admin side, and the page shows just after I login. Then, if I refresh or leave the page, the whole site stops showing - it just shows a blank page! I know this suggests an error somewhere in my code, but I can't understand why it works and suddenly stops after reloading the page - the only conclusion I could think of is caching. Anyway, I made three models: one for the template, form data and users. Here's a basic dir/file structure of the site: Code: + application Code: $this->template->loadView('public', 'home/main', $this->data); The loadView() function loads the common header/footer files and the main display file by using param1 of loadView as the group (i.e. public); param2 as the file path within the group, and param3 as optional data array, so you basically end up with a new load->view() function to automatically load a few more files and to set a bit more default data. Here's a few examples just to be a bit clearer: Code: $this->template->loadView('public', 'home/main'); If anyone could possibly shed some light on what might be happening or possibly tell me I'm doing it all wrong, I'd welcome the help! Thanks, Ben
[eluser]jcavard[/eluser]
You should paste your controller code. try this Code: ERROR_REPORTING(E_ALL);
[eluser]bena[/eluser]
Hi man thanks for the reply, This is what I mean though, it's set to max error output and I still just end up with nothing. It works just fine up until I login, here's some of the code: ... and while pasting the code I found the problem ... oops I had a mistake in the user model: Code: $this->session('user_data'); instead of: Code: $this->session->userdata('user_data'); Never mind.. thanks for asking me to paste the code! Regards, Ben |
Welcome Guest, Not a member yet? Register Sign In |