wish help you to fix your issue I am working in a Joomla site I want to include a module inside a component view anybody help me. I am using this code it display unauthorized access message. , Try this
// this is where you want to load your module position
$modules = JModuleHelper::getModules('header');
foreach($modules as $module)
Hope that helps IIRC, even if a component is not installed correctly, you can still access the code if it's on the server, from my experience. But that may have been a 1.5 thing. If you don't specify a view in the URL by passing &view=viewname, AND you haven't set a default fallback view, then you can't expect to have anything come up.
// Set the default view name and format from the Request.
$vName = $this->input->get('view', 'categories');
Trying to add a second view in a new component in Joomla! 3.x
Does that help Answering my own question, the problem was in the views/municipalitys/tmpl/default.php. The form contained in that file was wrong, missing the id="adminForm" and the proper action= value.
joomla sef redirect component view to default view
I think the issue was by ths following , I was able to successfully use multiple models from the same view by making calls directly in the two view files to properly formed models. I did not follow Joomla documentation because I didn't modify either possible controller (one being the controller for the entire component and the other controller being view-specific). I also did not use the functions provided in Joomla documentation, as those produced errors. According to proper Joomla MVC convention, a view is created by two files in the relevant view directory and subfolder:
class ComponentnameViewMultiviewname extends JViewLegacy
// $items is for the default model
// $ItemsOtherModel is for second model. Notice the '$' used here but not elsewhere
public function display($tpl = null)
$app = JFactory::getApplication();
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->params = $app->getParams('com_componentname');
// sets default model
$this->setModel( $this->getModel( 'model-a' ), true );
// sets second model & uses 'JModelLegacy,' contrary to documentation
// assigns array from the second model to 'ItemsOtherModel.' there is no '$' sign used.
$this->ItemsOtherModel = $this->get('Items','model-b');
echo "<h3>Items from default model</h3> ";
echo "<h3>items from secondary model</h3> ";
// notice that the '$' is absent from 'ItemsOtherModel'