alanstylez
Member
( ! ) Fatal error: Call to undefined method JException::getQuery() in /mnt/data/vhosts/nuvacord.net/httpdocs/administrator/components/com_fabrik/models/lists.php on line 47
Call Stack
# Time Memory Function Location
1 0.0003 667256 {main}( ) ../index.php:0
2 0.6329 3054008 JAdministrator->dispatch( ) ../index.php:47
3 0.6403 3955144 JComponentHelper::renderComponent( ) ../application.php:154
4 3.4279 4222088 require_once( '/mnt/data/vhosts/nuvacord.net/httpdocs/administrator/components/com_fabrik/fabrik.php' ) ../helper.php:152
5 3.6206 8688288 JController->execute( ) ../fabrik.php:32
6 3.6206 8688368 FabrikController->display( ) ../controller.php:649
7 3.6206 8688448 JController->display( ) ../controller.php:30
8 25.1211 9451056 FabrikViewLists->display( ) ../controller.php:616
9 25.1211 9451184 JView->get( ) ../view.html.php:38
10 25.1211 9451360 JModelList->getItems( ) ../view.php:365
11 25.1218 9452712 JModelList->_getListQuery( ) ../modellist.php:104
12 25.1218 9452920 FabrikModelLists->getListQuery( ) ../modellist.php:81
The above error seems to be coming from the following code:
protected function getListQuery()
{
// Initialise variables.
$db = $this->getDbo();
$query = $db->getQuery(true);
// Select the required fields from the table.
$query->select(
$this->getState(
'list.select',
'l.*'
)
);
$query->from('`#__{package}_lists` AS l');
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published)) {
$query->where('l.published = '.(int)$published);
} else if ($published === '') {
$query->where('(l.published IN (0, 1))');
}
//Filter by search in title
$search = $this->getState('filter.search');
if (!empty($search)) {
$search = $db->Quote('%'.$db->getEscaped($search, true).'%');
$query->where('(l.db_table_name LIKE '.$search.' OR l.label LIKE '.$search.')');
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering');
$orderDirn = $this->state->get('list.direction');
if ($orderCol == 'ordering' || $orderCol == 'category_title') {
$orderCol = 'category_title '.$orderDirn.', ordering';
}
if (trim($orderCol) !== '') {
$query->order($db->getEscaped($orderCol.' '.$orderDirn));
}
return $query;
}
/**
* Method to get a store id based on model configuration state.
*
* This is necessary because the model is used by the component and
* different modules that might need different sets of data or different
* ordering requirements.
*
* @param string $id A prefix for the store id.
* @return string A store id.
* @since 1.6
*/
How do I fix it?
stylez
Call Stack
# Time Memory Function Location
1 0.0003 667256 {main}( ) ../index.php:0
2 0.6329 3054008 JAdministrator->dispatch( ) ../index.php:47
3 0.6403 3955144 JComponentHelper::renderComponent( ) ../application.php:154
4 3.4279 4222088 require_once( '/mnt/data/vhosts/nuvacord.net/httpdocs/administrator/components/com_fabrik/fabrik.php' ) ../helper.php:152
5 3.6206 8688288 JController->execute( ) ../fabrik.php:32
6 3.6206 8688368 FabrikController->display( ) ../controller.php:649
7 3.6206 8688448 JController->display( ) ../controller.php:30
8 25.1211 9451056 FabrikViewLists->display( ) ../controller.php:616
9 25.1211 9451184 JView->get( ) ../view.html.php:38
10 25.1211 9451360 JModelList->getItems( ) ../view.php:365
11 25.1218 9452712 JModelList->_getListQuery( ) ../modellist.php:104
12 25.1218 9452920 FabrikModelLists->getListQuery( ) ../modellist.php:81
The above error seems to be coming from the following code:
protected function getListQuery()
{
// Initialise variables.
$db = $this->getDbo();
$query = $db->getQuery(true);
// Select the required fields from the table.
$query->select(
$this->getState(
'list.select',
'l.*'
)
);
$query->from('`#__{package}_lists` AS l');
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published)) {
$query->where('l.published = '.(int)$published);
} else if ($published === '') {
$query->where('(l.published IN (0, 1))');
}
//Filter by search in title
$search = $this->getState('filter.search');
if (!empty($search)) {
$search = $db->Quote('%'.$db->getEscaped($search, true).'%');
$query->where('(l.db_table_name LIKE '.$search.' OR l.label LIKE '.$search.')');
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering');
$orderDirn = $this->state->get('list.direction');
if ($orderCol == 'ordering' || $orderCol == 'category_title') {
$orderCol = 'category_title '.$orderDirn.', ordering';
}
if (trim($orderCol) !== '') {
$query->order($db->getEscaped($orderCol.' '.$orderDirn));
}
return $query;
}
/**
* Method to get a store id based on model configuration state.
*
* This is necessary because the model is used by the component and
* different modules that might need different sets of data or different
* ordering requirements.
*
* @param string $id A prefix for the store id.
* @return string A store id.
* @since 1.6
*/
How do I fix it?
stylez