× Support for Joomla 2.5 templates is discontinued. This forum category is read-only.

error page

More
4 years 7 months ago #7488 by hefinw
hefinw created the topic: error page
I have the following inserted into the error.php page in templates/jm-news-portal. I have created the article with the new error information in it, added a hidden menu link to it but it is just giving me the basic error information and not the new page information. Any help would be appreciated

defined('_JEXEC') or die;
if (!isset($this->error)) {
header('Location: /index.php?option=com_content&view=article&id=125');
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
exit;
}

Please Log in or Create an account to join the conversation.

More
4 years 7 months ago #7494 by artur
artur replied the topic: error page
Hello,
You should add something like this :
//get error code
$errorcode = $this->error->getCode();
if($errorcode=='404') {
header('Location: xxxx');
exit();
}

Best Regards.

Please Log in or Create an account to join the conversation.

Time to create page: 0.219 seconds

INDICO S.C.

ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2019 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.