Welcome Guest, Not a member yet? Register   Sign In
unable to load requested file
#1

[eluser]bigdaddysheikh[/eluser]
Hey guys,

This is by far the strangest error I have encountered.

The code works fine in different controllers, also the first method in the controller works. So I thought it could be something with the file itself, I renamed the file and tried it then. It works the first time but when clicked on again the same error appears.

Now I am dumbfound as to why this is happening and how to resolve this.

The controller methods that dont work is
Code:
function add()
    {
        $data["logged_in"] = $this->session->userdata('logged_in');            
        $data["url"][] = anchor(base_url().'index.php/admin/city/add', 'Add City');                        
        $data["url"][] = anchor(base_url().'index.php/admin/subcity/add/'.$this->uri->segment(4), 'Add Sub Region');        
        $show = "subcity/subcityAdd";
            
        $this->load->view('admin/inc/header', $data);            
        $this->load->view('admin/'.$show);                    
        $this->load->view('admin/inc/footer');                
    }
    
    function edit(){
        $data["logged_in"] = $this->session->userdata('logged_in');            
        $data["url"][] = anchor(base_url().'index.php/admin/city/add', 'Add City');                        
        $data["url"][] = anchor(base_url().'index.php/admin/subcity/add/'.$this->uri->segment(4), 'Add Sub Region');        
        $show = "subcity/subcityEdit_new";
        
        
        $this->load->view('admin/inc/header', $data);            
        $this->load->view('admin/'.$show);                    
        $this->load->view('admin/inc/footer');                
    }

here is the sample form file
Code:
<div id="rightCol">

    &lt;?=form_open('/admin/subcity/insert', array('class' => 'listForm')); ?&gt;
    <fieldset>
        <legend>Edit Sub region</legend>

        <label for="name">City Name:</label>
        &lt;input type="text" name="name" id="name" value="&lt;?=$city[0]-&gt;name?&gt;" /><br>

        <label for="keywords">Keywords:</label>
        &lt;textarea name="keywords" id="keywords" cols="45" rows="5"&gt;&lt;?=$city[0]->keywords?&gt;&lt;/textarea&gt;&lt;br>

        <label for="description">Description</label>
        &lt;textarea name="description" id="description" cols="45" rows="5"&gt;&lt;?=$city[0]->description?&gt;&lt;/textarea&gt;&lt;br>

        <label for="title">Title</label>
        &lt;textarea name="title" id="title" cols="45" rows="5"&gt;&lt;?=$city[0]->title?&gt;&lt;/textarea&gt;&lt;br>

        <button type="submit" value="Submit" class="btn"/>Submit</button>
          <button type="button" value="Cancel">Cancel</button>
        
        &lt;input type="reset" value="Reset" class="btn"/&gt;
        &lt;input type="hidden" value="edit" name="type"&gt;
        &lt;input type="hidden" name="cat_id" value="&lt;?=$city[0]-&gt;cat_id?&gt;" >        
        &lt;input type="hidden" name="ID" value="&lt;?=$this-&gt;uri->segment(4)?&gt;" />    
    </fieldset>
    &lt;/form&gt;
</div>

All other controllers work fine.




Theme © iAndrew 2016 - Forum software by © MyBB