[FIXED IN SVN] Bugs in category blog - Joomla! Forum - community, help and support
description:
a) use of parameter doesn’t exists. in category view can’t show section information article.
b) if set category blog show category name article item error message:
notice: undefined property: stdclass::$category in /var/www/15beta/templates/angie/html/com_content/category/blog_item.php on line 61
reported on:
a) 1.5 beta
b) 1.5 beta
classification:
i think high
affected functions:
a) noting, cruft program code
b) notice message in category blog view
related files:
a) root/components/com_content/views/category/tmpl/blog_item.php
b) root/components/com_content/views/category/tmpl/blog_item.php
and root/components/com_content/models/category.php
steps replicate:
a) hmmm, install joomla
b) switch show category names for menu item “the news” , use menu item
analysis:
[q&t] confirmed/unable confirm/rejected
any other comments
proposed fix(es):
a) delete
b) change blog_item.php
to
and change category.php
to
topic / artifact id:
no artifact created
a) use of parameter doesn’t exists. in category view can’t show section information article.
b) if set category blog show category name article item error message:
notice: undefined property: stdclass::$category in /var/www/15beta/templates/angie/html/com_content/category/blog_item.php on line 61
reported on:
a) 1.5 beta
b) 1.5 beta
classification:
i think high
affected functions:
a) noting, cruft program code
b) notice message in category blog view
related files:
a) root/components/com_content/views/category/tmpl/blog_item.php
b) root/components/com_content/views/category/tmpl/blog_item.php
and root/components/com_content/models/category.php
steps replicate:
a) hmmm, install joomla
b) switch show category names for menu item “the news” , use menu item
analysis:
[q&t] confirmed/unable confirm/rejected
any other comments
proposed fix(es):
a) delete
code: select all
<?php if ($this->params->get('section') && $this->item->sectionid) : ?>
<span>
<?php echo $this->item->section; ?>
<?php if ($this->params->get('category')) : ?>
<?php echo ' - '; ?>
<?php endif; ?>
</span>
<?php endif; ?>
b) change blog_item.php
code: select all
<?php if ($this->params->get('category') && $this->item->catid) : ?>
<span>
<?php echo $this->item->category; ?>
</span>
<?php endif; ?>
code: select all
<?php if ($this->params->get('category') && $this->item->category) : ?>
<span>
<?php echo $this->item->category; ?>
</span>
<?php endif; ?>
and change category.php
code: select all
function _loadcontent($state = 1)
{
if (empty($this->_category))
{
return false; // todo: set error -- can't siblings when don't know category
}
// lets load siblings if don't exist
if (empty($this->_content[$state]))
{
// pagination request variables
$limit = jrequest::getvar('limit', 0, '', 'int');
$limitstart = jrequest::getvar('limitstart', 0, '', 'int');
// if voting turned on, voting data content items
$voting = jcontenthelper::buildvotingquery();
// , order clauses query
$where = $this->_buildcontentwhere($state);
$orderby = $this->_buildcontentorderby($state);
$query = "select a.id, a.title, a.title_alias, a.introtext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by," .
"\n a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.attribs, a.hits, a.images, a.urls, a.ordering, a.metakey, a.metadesc, a.access," .
"\n char_length( a.`fulltext` ) readmore, u.name author, u.usertype, g.name groups".$voting['select'] .
"\n #__content a" .
"\n left join #__users u on u.id = a.created_by" .
"\n left join #__groups g on a.access = g.id".
$voting['join'].
$where.
$orderby;
$this->_db->setquery($query, $limitstart, $limit);
$this->_content[$state] = $this->_db->loadobjectlist();
}
return true;
}
to
code: select all
function _loadcontent($state = 1)
{
if (empty($this->_category))
{
return false; // todo: set error -- can't siblings when don't know category
}
// lets load siblings if don't exist
if (empty($this->_content[$state]))
{
// pagination request variables
$limit = jrequest::getvar('limit', 0, '', 'int');
$limitstart = jrequest::getvar('limitstart', 0, '', 'int');
// if voting turned on, voting data content items
$voting = jcontenthelper::buildvotingquery();
// , order clauses query
$where = $this->_buildcontentwhere($state);
$orderby = $this->_buildcontentorderby($state);
$query = "select a.id, a.title, a.title_alias, a.introtext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by," .
"\n a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.attribs, a.hits, a.images, a.urls, a.ordering, a.metakey, a.metadesc, a.access," .
"\n cc.name category,char_length( a.`fulltext` ) readmore, u.name author, u.usertype, g.name groups".$voting['select'] .
"\n #__content a" .
"\n left join #__users u on u.id = a.created_by" .
"\n left join #__groups g on a.access = g.id".
"\n , #__categories cc".
$voting['join'].
$where.
$orderby;
$this->_db->setquery($query, $limitstart, $limit);
$this->_content[$state] = $this->_db->loadobjectlist();
}
return true;
}
topic / artifact id:
no artifact created
lots of fixes since post - tested steps replicate , not replicate. if still having issue, please post new report.
Comments
Post a Comment