PHP Notice: Undefined index: buttoncount

griffin

Member
Hi

Just started getting errors on custom list template that haven't appeared before as follows:

1.
PHP Notice: Undefined index: buttoncount in /.../components/com_fabrik/views/list/tmpl/TB_List/template_css.php on line 13
and line 12

12: $c = $_REQUEST['c'];
13: $buttonCount = (int) $_REQUEST['buttoncount'];

as part of:
$c = $_REQUEST['c'];
$buttonCount = (int) $_REQUEST['buttoncount'];
$buttonTotal = $buttonCount === 0 ? '100%' : 30 * $buttonCount ."px";
echo "


2.
PHP Notice: Undefined index: buttoncount in /.../components/com_fabrik/views/list/tmpl/TB_List/custom_css.php on line 38
and line 37

37: $c = $_REQUEST['c'];
38: $buttonCount = (int) $_REQUEST['buttoncount'];

as part of:
$c = $_REQUEST['c'];
$buttonCount = (int) $_REQUEST['buttoncount'];
$buttonTotal = $buttonCount === 0 ? '100%' : 30 * $buttonCount ."px";
echo "

Not sure what to do here - any advice would be appreciated.
Cheers
Chris
 
You can just remove those two lines:

Code:
$buttonCount = (int) $_REQUEST['buttoncount'];
$buttonTotal = $buttonCount === 0 ? '100%' : 30 * $buttonCount ."px";

Not sure why we left those in the custom example, I think that's just from where we originally copied the main template_css.php to create the custom example from. And actually I don't think we even use those variables in the main template_css.php any more, so they could be entirely removed. We used to use $buttonTotal for setting the width of the button container on a list but we do that differently now.

I'll remove those lines from the example in github.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top