• Resolved sailorob

    (@sailorob)


    When I define a custom layout for the view, $this->render_main_view() generates this error:

    [MVC] Warning: View "layouts" not found.
    Thrown on line 204 of /home/content/d/c/p/dcpihosting/html/lsgs/wp-content/plugins/wp-mvc/core/controllers/mvc_controller.php 
    
    Warning: require() [function.require]: Filename cannot be empty in /home/content/d/c/p/dcpihosting/html/lsgs/wp-content/plugins/wp-mvc/core/controllers/mvc_controller.php on line 265
    
    Fatal error: require() [function.require]: Failed opening required '' (include_path='.:/usr/local/php5/lib/php') in /home/content/d/c/p/dcpihosting/html/lsgs/wp-content/plugins/wp-mvc/core/controllers/mvc_controller.php on line 265

    My controller:

    class EventsController extends MvcPublicController {
    	public function index(){
    		$this->render_view('show',array('layout'=>'layout-3'));
    	}
    
    	public function show() {
    		//$this->set_object();
    		$this->render_view('layouts',array('layout'=>'layout-2'));
    	}
    }

    My layout pages simply call $this->render_main_view()

    http://wordpress.org/extend/plugins/wp-mvc/

The topic ‘[Plugin: WP MVC] [MVC] Warning: View "layouts" not found.’ is closed to new replies.