0

i am using the T3 Framework for my template and did everything as described in the forum. Everything is working in the backend but i am not able to retrieve the values in the frontend. I am getting a couple of Errors:

*Notice: Undefined property: CustompropertiesViewSearch::$item in /www/htdocs/w00e40a7/pc-helfer/ego-new/templates/t3_bs3_blank/html/com_customproperties/search/default_item.php on line 17

Notice: Trying to get property of non-object in /www/htdocs/w00e40a7/pc-helfer/ego-new/templates/t3_bs3_blank/html/com_customproperties/search/default_item.php on line 17*

It looks like i have some unknown/undefined variables, but i don't know how to define them. Can anybody help with this?

This is the code:

<?php
/**
 * Custom Properties for Joomla! 3.x
 * @package Custom Properties
 * @subpackage Component
 * @version 3.0.0
 * @revision $Revision: 1.1 $
 * @author Andrea Forghieri
 * @copyright (C) 2013 Andrea Forghieri, Solidsystem - http://www.solidsystem.it
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL version 2
 */
defined('_JEXEC') or die('Restricted access');
$attribs = new JRegistry($this->item->attribs);
?>


<dl>
    <dt class="cp-title result-title">
        <a href="<?php echo JRoute::_($this->row->href);?>"><?php echo $this->escape($this->row->title);?></a><?php if ($attribs->get('untertitel')) : ?>
    <span class="item-state state-<?php echo $attribs->get('untertitel') ?>">
        <?php echo $attribs->get('untertitel') ?>

    </span>

    <?php endif ?>

    </dt>
    <?php if($this->row->category_title  && $this->show_category):?>
    <dd class="cp-category result-category">
        <span class="small">(<?php echo $this->escape($this->row->category_title);?>)</span>
    </dd>
    <?php endif;?>


<?php if($this->view != CP_VIEW_TITLE_ONLY):?>
    <dd class="cp-text result-text">    
    <?php if($this->view == CP_VIEW_HTML_INTRO  || $this->view == CP_VIEW_IMAGE_AND_TEXT):?>
        <?php if($this->image_thumbnail):?>
            <?php if($image = CPImageHelper::getPreviewImage($this->ce, $this->row, $this->params)):?>
                <?php if($image->url):?>
                <div class="cp-image">
                    <a href="<?php echo $this->row->href;?>" title="<?php echo $this->escape($this->row->title);?>">
                        <img src="<?php echo $image->url;?>" height="<?php echo $image->height;?>" width="<?php echo $image->width?>" alt="<?php echo $this->escape($this->row->title);?>"/>
                    </a>
                </div>
                <?php elseif($this->debug_images):?>
                <div class="cp-image alert alert-error">
                    <?php echo $image->getError();?>
                </div>
                <?php endif;?>
            <?php endif;?>
        <?php endif;?>
    <?php endif;?>

    <?php if($this->view == CP_VIEW_PLAIN_TEXT || $this->view == CP_VIEW_IMAGE_AND_TEXT):?>
    <?php echo $text = CPTextHelper::getPlainText($this->row, $this->searchword, $this->text_length, $this->searchphrase);?>
        <?php 
        //dirty hack: if text end with '&nbsp...' it has been truncated
        // therefore I can append the readmore
        if($this->show_readmore && (substr($text, -9) === '&nbsp;...')):?>
        <p class="readmore">
            <a class="btn" href="<?php echo $this->row->href?>">
                <?php if($this->params->get('append_title_to_readmore')):?>
                <?php echo $this->escape($this->readmore_text).': ' . $this->escape($this->row->title);?>
                <?php else:?>
                <?php echo $this->escape($this->readmore_text);?>
                <?php endif;?>
            </a>
        </p>
        <?php endif;?>
    <?php elseif($this->view == CP_VIEW_HTML_INTRO):?>
        <?php echo $text = CPTextHelper::getCleanHTMLIntro($this->row, $this->searchword, $this->searchphrase, $this->params);?>
        <?php if($this->show_readmore && $this->row->fulltext != ''):?>
        <p class="readmore">
            <a class="btn" href="<?php echo $this->row->href?>">
                <span class="icon-chevron-right"></span>
                <?php if($this->params->get('append_title_to_readmore')):?>
                <?php echo $this->escape($this->readmore_text).': ' . $this->escape($this->row->title);?>
                <?php else:?>
                <?php echo $this->escape($this->readmore_text);?>
                <?php endif;?>
            </a>
        </p>    
        <?php endif;?>
    <?php endif;?>
    </dd>
<?php endif;?>
</dl>
  • Do me a favor, take a backup of the following directory ego-new/templates/t3_bs3_blank/html/com_customproperties, and then remove the com_customproperties directory. Just want to see the outcome – Lodder Apr 17 '15 at 23:12
  • Why would i remove the component i want to use? I am trying to override the default output. The override is already in my template but throwing out these errors. – Hyperxx Apr 18 '15 at 7:09
  • 1
    Im not asking you to remove the component, but asking you to remove the override to see what happens. The whole part of helping you debug the problem. – Lodder Apr 18 '15 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.