twistedhardware
New Member
Hi,
I'm using the content plugin to show a list with a filter under a form:
{fabrik view=list id=36 crm_purchaseorderline___PurchaseOrder=[rowid]}
I receive in header
"Set crm_purchaseorderline___PurchaseOrder=XX"
Where XX is the rowid
I checked the source code and found this:
/components/com_fabrik/controllers/list.php
I commented out this line to stop that behavior:
I had another problem which is, when ever I show this form that showed the filtered list, then I try to show the original list I receive an empty list. I tried restfilters from the menu options but didn't work. Logging out and in again worked.
I commented out the last line too and it seems to work again perfectly. It even show the filter in the element and applies it when I add new items.
What do you think Rob? should I change that and create a pull request on Github?
I'm using the content plugin to show a list with a filter under a form:
{fabrik view=list id=36 crm_purchaseorderline___PurchaseOrder=[rowid]}
I receive in header
"Set crm_purchaseorderline___PurchaseOrder=XX"
Where XX is the rowid
I checked the source code and found this:
/components/com_fabrik/controllers/list.php
PHP:
protected function _setRequest($unused)
{
$app = JFactory::getApplication();
$input = $app->input;
/*
* $$$ hugh - in order to allow complex filters to work in lists, like ...
* foo___bar[value][]=1 foo___bar[value[]=9 foo___bar[condition]=BETWEEN
*we have to build a qs style array structure, using parse_str().
*/
$qs_arr = array();
$qs_str = implode('&', $unused);
parse_str($qs_str, $qs_arr);
$this->origRequestVars = array();
foreach ($qs_arr as $k => $v)
{
$origVar = $input->get($k. '', 'string');
$this->origRequestVars[$k] = $origVar;
$_GET[$k] = $v;
echo "set $k = $v <br>";
$input->set($k, $v);
}
/*
* $$$ rob set this array here - we will use in the tablefilter::getQuerystringFilters()
* code to determine if the filter is a querystring filter or one set from the plugin
* if its set from here it becomes sticky and is not cleared from the session. So we basically
* treat all filters set up inside {fabrik.....} as prefilters
*/
$input->set('fabrik_sticky_filters', array_keys($qs_arr));
}
PHP:
echo "set $k = $v <br>";
I commented out the last line too and it seems to work again perfectly. It even show the filter in the element and applies it when I add new items.
PHP:
//$input->set('fabrik_sticky_filters', array_keys($qs_arr));