?
avatar titanwww
titanwww
24 Nov 2018

Steps to reproduce the issue

no load default.php override default article template

<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params  = $this->item->params;
$images  = json_decode($this->item->images);
$urls    = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$user    = JFactory::getUser();
$info    = $params->get('info_block_position', 0);

// Check if associations are implemented. If they are, define the parameter.
$assocParam = (JLanguageAssociations::isEnabled() && $params->get('show_associations'));
JHtml::_('behavior.caption');
$app = JFactory::getApplication();
?>
<?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'below')); ?>
<?php
$cat_accounting_news = 39;
$cat_legal_news = 38;
$cat_services_id = 18;
$reviews_category_id = 46;
if($this->item->catid == $cat_accounting_news || $this->item->catid == $cat_legal_news){
	include JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html/com_content/article/news.php';
}elseif($this->item->parent_id == $cat_services_id) {
	include JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html/com_content/article/service.php';
}
elseif ($this->item->catid == $reviews_category_id) {
	include JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html/com_content/article/review.php';
}
else {
    include JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html/com_content/article/element.php';
}

?>

Expected result

empty page

Actual result

no load element.php review.php service.php news.php

System information (as much as possible)

Joomla 3.8.11 normal work

Additional comments

avatar titanwww titanwww - open - 24 Nov 2018
avatar joomla-cms-bot joomla-cms-bot - change - 24 Nov 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Nov 2018
avatar titanwww titanwww - change - 24 Nov 2018
The description was changed
avatar titanwww titanwww - edited - 24 Nov 2018
avatar mbabker mbabker - change - 24 Nov 2018
The description was changed
avatar mbabker mbabker - edited - 24 Nov 2018
avatar titanwww titanwww - change - 24 Nov 2018
The description was changed
avatar titanwww titanwww - edited - 24 Nov 2018
avatar titanwww
titanwww - comment - 24 Nov 2018

work else static address

if($this->item->catid == $cat_accounting_news || $this->item->catid == $cat_legal_news){
	include 'templates/newfirmmaker/html/com_content/article/news.php';
}elseif($this->item->parent_id == $cat_services_id) {
	include 'templates/newfirmmaker/html/com_content/article/service.php';
}
elseif ($this->item->catid == $reviews_category_id) {
	include 'templates/newfirmmaker/html/com_content/article/review.php';
}
else {
    include 'templates/newfirmmaker/html/com_content/article/element.php';
}
avatar ReLater
ReLater - comment - 24 Nov 2018

Activate error_reporting in Joomla configuration!
I think you will get a message like 'DS' is not defined.

You should ask in a forum for help because that's not a Joomla core issue

avatar joomla-cms-bot joomla-cms-bot - change - 19 Dec 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-12-19 01:06:22
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 19 Dec 2018
avatar Quy Quy - change - 19 Dec 2018
Closed_Date 2018-12-19 01:06:22 2018-12-19 01:06:23
Closed_By joomla-cms-bot Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 19 Dec 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23159

Add a Comment

Login with GitHub to post a comment