Note that there are some explanatory texts on larger screens.

plurals
  1. POJoomla component Development: Invalid controller: name='', format=''
    text
    copied!<p>I am trying out to develop components from <a href="http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Basic_backend" rel="nofollow">here</a>. I am getting an error on the admin section</p> <blockquote> <p>500 - An error has occurred.</p> <p>Invalid controller: name='', format=''</p> </blockquote> <p>How to debug this? I dont even know what code is relevant to post.</p> <p>File: admin/controller.php</p> <pre><code>// No direct access to this file defined('_JEXEC') or die('Restricted access'); // import Joomla controller library jimport('joomla.application.component.controller'); class TestimonialsController extends JController { function display($cachable = false) { // set default view if not set JRequest::setVar('view', JRequest::getCmd('view', 'Testimonials')); // call parent behavior parent::display($cachable); } } </code></pre> <p>File: admin/testimonials.php</p> <pre><code>&lt;?php // No direct access to this file defined('_JEXEC') or die('Restricted access'); jimport('joomla.application.component.controller'); $controller = JController::getInstance('Testimonials'); $controller-&gt;execute(JRequest::getCmd('task')); $controller-&gt;redirect(); </code></pre> <p>File: admin/views/testimonials/view.html.php</p> <pre><code>&lt;?php // No direct access to this file defined('_JEXEC') or die('Restricted access'); // import Joomla view library jimport('joomla.application.component.view'); class TestimonialsViewTestimonials extends JView { function display($tpl = null) { $items = $this -&gt; get("Items"); $pagination = $this -&gt; get("Pagination"); //Check for errors if (count($errors = $this-&gt;get('Errors'))) { JError::raiseError(500, implode('&lt;br /&gt;', $errors)); return false; } // Assign data to the view $this -&gt; items = $items; $this -&gt; pagination = $pagination; // Display the template parent::display($tpl); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload