VeCrea wrote:
I already forked the model and the tables, but i get nothing.
Hi VeCrea,
Its a long shot as i dont know if it is even related without seeing your component but
Interesting I forked a view.html.php file this week and for some reason i didnt get what i expected either...
(before i go further i must say that it is more than likely something that i perhaps coded wrong in my forked file)
for some reason I got default view not found return to control panel
it appears to work until I create the forked file
with the forked file in place i found that it called for a non existent display function
public function display($tpl = null)
{
/* Forked
$layout = $this->getLayout();
if (!in_array($layout, array('layout1', 'layout2')))
JError::raiseError(0, $layout . ' : ' . JText::_('JERROR_LAYOUT_PAGE_NOT_FOUND'));
$fct = "display" . ucfirst($layout);
$this->addForkTemplatePath();
$this->$fct($tpl);
$this->_parentDisplay($tpl);
*/
}
I tracked it back to this function above and looking at this i can see the following
$layout = $this->getLayout();
// var_dump($layout) gives 'default'
and as we move further down the function we see
$fct = "display" . ucfirst($layout);
// so now $fct = displayDefault
and now further down the function we now call the displayDefault function
so now i search for a displayDefault function in my original view.html.php file
guess what i dont have a displayDefault function
just a wild guess but by chance could you be doing something that perhaps ends up calling the Default view similar to this above?
I am guessing the starting place here is to either hard code the layout or retrieve the actual layout name from some other existing function, class or helper
but its been a while since and i cant remember where such function may be located
$layout = $this->getLayout();
if($layout === 'default'){
$layout = 'layout2';
// OR $layout = getDefaultLayoutName();
// wherever such function may be hiding
// hard coding as below would be an option too i guess
//$layout = $this->getLayout('mydefaultlayout');
}
So as i said i know something in my forked code caused this and we know that it has caused the layout name to be lost but perhaps
should return the the actual default table name not "default" as it does now
Just a thought
@Admin should i perhaps raise this as a ticket?
just not sure at the moment without looking into it further if its related to my additional code or could infact be an underlying bug