pepperstreet VIP
Total posts: 3,837
16 Апр 2014 19:55

Hello, just noticed a fatal error if I choose filter template "checkboxes"!?

Bildschirmfoto 2014-04-16 um 21.13.35

Page output is totally messed up.

Error message:

Fatal error: Call to undefined method JFormFieldCStatus::_getVal() in /../components/com_cobalt/fields/status/tmpl/filter/checkboxes.php on line 21

Content of Status v8.36 filtr template - checkboxes:

<?php
/**
 * Cobalt by MintJoomla
 * a component for Joomla! 1.7 - 2.5 CMS ( http://www.joomla.org )
 * Author Website:  http://www.mintjoomla.com/ 
 * @copyright Copyright (C) 2012 MintJoomla ( http://www.mintjoomla.com ). All rights reserved.
 * @license GNU/GPL  http://www.gnu.org/copyleft/gpl.html 
 */
defined('_JEXEC') or die();
?>

<?php
$default = $this->value;
ArrayHelper::clean_r($default);
if (!is_array($this->value))
    settype($this->value, 'array');

foreach($this->values as $key => $value) :
    if (!$value->field_value)
        continue;
    $label = $this->_getVal($value->field_value);
    if($this->params->get('params.icon'.$value->field_value))
    {
        $path = JURI::root() . 'components/com_cobalt/fields/status/icons/';
        $label = JHtml::image($path . $this->params->get('params.icon' . $value->field_value), JText::_($c[0]), array('class' => 'hasTip', 'title' => JText::_($c[0]), 'align' => 'absmiddle')). ' '.$label;
    }
    ?>
    <label class="checkbox">
        <input type="checkbox" name="filters[<?php echo $this->key;?>][]" value="<?php echo htmlspecialchars($value->field_value);?>" 
            id="flt-<?php echo $this->id;?>-<?php echo $key;?>" <?php echo (in_array($value->field_value, $this->value) ? ' checked="checked"' : NULL);?>> 
            <?php echo $label;?><?php echo ($this->params->get('params.filter_show_number', 1) ? " <span class=\"badge\">{$value->num}</span>" : NULL);?>
    </label>
<?php endforeach; ?>

BTW, template "selectbox" works:

Bildschirmfoto 2014-04-16 um 21.16.24

Последние изменения: 17 Апр 2014


Sergey
Total posts: 13,748
17 Апр 2014 08:56

Fixed.

Работает на Cobalt