-
AuthorPosts
-
Andrew Winkler Friend
Andrew Winkler
- Join date:
- September 2014
- Posts:
- 725
- Downloads:
- 206
- Uploads:
- 31
- Thanks:
- 291
- Thanked:
- 34 times in 2 posts
May 10, 2015 at 10:33 pm #206250I’ve recently upgraded from JA University T3 to JA Teline V, and I’m super happy with the new template, it’s brilliant, it’s beautiful and it’s fast. However, one of a couple of problem I’ve got left is that the custom error pages no longer work. If you enter any non-existing URL, I just get the plain vanilla Joomla “controller missing” error page, instead of the cute custom Joomlart error page. Can you please help me with this?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
Andrew Winkler FriendAndrew Winkler
- Join date:
- September 2014
- Posts:
- 725
- Downloads:
- 206
- Uploads:
- 31
- Thanks:
- 291
- Thanked:
- 34 times in 2 posts
May 13, 2015 at 1:44 am #570378I don’t think my case has anything to do with the problem covered in that Jomsocial ticket which was about a conflict between Jomsocial and a superseded version of Kunena.
Here’s the full thread:
http://awesomescreenshot.com/08a4wka330
So why would my site produce the standard Joomla ‘missing controller’ page instead of the sexy JA Teline V custom error page?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
Andrew Winkler FriendAndrew Winkler
- Join date:
- September 2014
- Posts:
- 725
- Downloads:
- 206
- Uploads:
- 31
- Thanks:
- 291
- Thanked:
- 34 times in 2 posts
May 14, 2015 at 2:46 pm #570560I really like your nice error pages because they not only look nice but they were with any kind of error and give you a proper error message, such an SQL error. So I would prefer to get that work on my site.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 15, 2015 at 8:22 am #570642I checked on JA Teline V template and saw it’s working with 404 error page of joomla default, I have defined 404 error page here, you can try to apply it on your site
Open templates/ja_teline_v/error.php file and replace all data in old file to new rule
<?php
/**
* @package Joomla.Site
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/defined('_JEXEC') or die;
if (!isset($this->error)) {
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
$theme = JFactory::getApplication()->getTemplate(true)->params->get('theme', '');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/error.css" type="text/css" />
<?php if($theme && is_file(T3_TEMPLATE_PATH . '/css/themes/' . $theme . '/error.css')):?>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/themes/<?php echo $theme ?>/error.css" type="text/css" />
<?php endif; ?>
<link href='http://fonts.googleapis.com/css?family=Handlee' rel='stylesheet' type='text/css'>
</head><body class="page-error">
<div class="error-page-wrap">
<div class="inner"><div class="error-code"><?php echo $this->error->getCode(); ?></div>
<div class="error-message">
<h2>SORRY!</h2>
<p>
<?php echo $this->error->getMessage(); ?><br />
<?php echo JText::_('JERROR_LAYOUT_PLEASE_TRY_ONE_OF_THE_FOLLOWING_PAGES'); ?> <a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_HOME_PAGE'); ?></a>
</p>
</div></div>
</div></body>
</html>
1 user says Thank You to Ninja Lead for this useful post
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 15, 2015 at 8:22 am #735705I checked on JA Teline V template and saw it’s working with 404 error page of joomla default, I have defined 404 error page here, you can try to apply it on your site
Open templates/ja_teline_v/error.php file and replace all data in old file to new rule
<?php
/**
* @package Joomla.Site
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/defined('_JEXEC') or die;
if (!isset($this->error)) {
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
$theme = JFactory::getApplication()->getTemplate(true)->params->get('theme', '');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/error.css" type="text/css" />
<?php if($theme && is_file(T3_TEMPLATE_PATH . '/css/themes/' . $theme . '/error.css')):?>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/themes/<?php echo $theme ?>/error.css" type="text/css" />
<?php endif; ?>
<link href='http://fonts.googleapis.com/css?family=Handlee' rel='stylesheet' type='text/css'>
</head><body class="page-error">
<div class="error-page-wrap">
<div class="inner"><div class="error-code"><?php echo $this->error->getCode(); ?></div>
<div class="error-message">
<h2>SORRY!</h2>
<p>
<?php echo $this->error->getMessage(); ?><br />
<?php echo JText::_('JERROR_LAYOUT_PLEASE_TRY_ONE_OF_THE_FOLLOWING_PAGES'); ?> <a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_HOME_PAGE'); ?></a>
</p>
</div></div>
</div></body>
</html>
1 user says Thank You to Ninja Lead for this useful post
Andrew Winkler FriendAndrew Winkler
- Join date:
- September 2014
- Posts:
- 725
- Downloads:
- 206
- Uploads:
- 31
- Thanks:
- 291
- Thanked:
- 34 times in 2 posts
May 17, 2015 at 12:57 pm #570833I have pasted it into my templates/ja_teline_v/error.php page and am now getting the standard HTML 404 error page. However that’s not what I was after. I wanted to get the nice custom error page with cool graphics that come with most of not all Joomlart templates. The last one I remember that was working had some owl there plus the error message. If the site returned a SQL error, it displayed that error text, which made debugging much easier for me. And of course it looked much better if the reader tried to open a page that doesnt’ exist.
Andrew Winkler FriendAndrew Winkler
- Join date:
- September 2014
- Posts:
- 725
- Downloads:
- 206
- Uploads:
- 31
- Thanks:
- 291
- Thanked:
- 34 times in 2 posts
May 17, 2015 at 12:57 pm #735895I have pasted it into my templates/ja_teline_v/error.php page and am now getting the standard HTML 404 error page. However that’s not what I was after. I wanted to get the nice custom error page with cool graphics that come with most of not all Joomlart templates. The last one I remember that was working had some owl there plus the error message. If the site returned a SQL error, it displayed that error text, which made debugging much easier for me. And of course it looked much better if the reader tried to open a page that doesnt’ exist.
zorroh Friendzorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
May 20, 2015 at 12:47 am #571160in near row 34 you find this
<div class="error-code"><?php echo $this->error->getCode(); ?></div>
Change it to
<div class="error-code"><?php if (($this->error->getCode()) == '404') {
header('Location: index.php?option=com_content&view=article&id=437');
exit;
} ?></div>Worked for me :-*
I also made a menu link for 404 article so for me works also ‘Location: 404’
<div class="error-code"><?php if (($this->error->getCode()) == '404') {
header('Location: 404');
exit;
} ?></div>1 user says Thank You to zorroh for this useful post
Andrew Winkler FriendAndrew Winkler
- Join date:
- September 2014
- Posts:
- 725
- Downloads:
- 206
- Uploads:
- 31
- Thanks:
- 291
- Thanked:
- 34 times in 2 posts
May 20, 2015 at 6:10 am #571178I have changed /templates/ja_teline_v/error.php accordingly but that still didnt’ work.
http://awesomescreenshot.com/0124wxorf3
I assume this might have something to do that there is no article with the ID 437. Am I right to assume that I need to create it? Probably a silly question.
So I have created a new Joomla content error page with the article ID 404 (I changed the ID in the content table) and then changed the ID in the error.php to that article ID number as well.
<?php
/**
* @package Joomla.Site
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/defined('_JEXEC') or die;
if (!isset($this->error)) {
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
$theme = JFactory::getApplication()->getTemplate(true)->params->get('theme', '');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/error.css" type="text/css" /></head>
<body class="page-error">
<div class="error">
<div id="outline">
<div id="error-outline">
<h1><?php echo $this->error->getCode(); ?></h1><div class="error-code"><?php if (($this->error->getCode()) == '404') {
header('Location: index.php?option=com_content&view=article&id=404');
exit;
} ?></div><div id="errorboxbody">
<?php echo JText::_('JERROR_LAYOUT_PLEASE_TRY_ONE_OF_THE_FOLLOWING_PAGES'); ?> <a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_HOME_PAGE'); ?></a>
</div></div>
</div>
</div>
</body>
</html>
zorroh Friendzorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
May 20, 2015 at 12:10 pm #571212Ok. now i discover that… Dashed link dont work and without any dash it will work.
This link dont work – http://kaev.net/t5/This-Link-Dosent-Exist
and link is working – http://kaev.net/t5/ThisLinkDosentExistThis is my error.php
<?php
/**
* @package Joomla.Site
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/defined('_JEXEC') or die;
if (!isset($this->error)) {
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
$theme = JFactory::getApplication()->getTemplate(true)->params->get('theme', '');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/error.css" type="text/css" />
<?php if($theme && is_file(T3_TEMPLATE_PATH . '/css/themes/' . $theme . '/error.css')):?>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/themes/<?php echo $theme ?>/error.css" type="text/css" />
<?php endif; ?>
<link href='http://fonts.googleapis.com/css?family=Handlee' rel='stylesheet' type='text/css'>
</head><body class="page-error">
<div class="error-page-wrap">
<div class="inner"><div class="error-code"><?php if (($this->error->getCode()) == '404') {
header('Location: 404');
exit;
} ?></div><div class="error-message">
</div>
</div>
</div></body>
</html>1 user says Thank You to zorroh for this useful post
zorroh Friendzorroh
- Join date:
- November 2006
- Posts:
- 422
- Downloads:
- 20
- Uploads:
- 43
- Thanks:
- 88
- Thanked:
- 80 times in 1 posts
May 20, 2015 at 12:10 pm #736260Ok. now i discover that… Dashed link dont work and without any dash it will work.
This link dont work – http://kaev.net/t5/This-Link-Dosent-Exist
and link is working – http://kaev.net/t5/ThisLinkDosentExistThis is my error.php
<?php
/**
* @package Joomla.Site
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/defined('_JEXEC') or die;
if (!isset($this->error)) {
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
$this->debug = false;
}
//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
$theme = JFactory::getApplication()->getTemplate(true)->params->get('theme', '');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/error.css" type="text/css" />
<?php if($theme && is_file(T3_TEMPLATE_PATH . '/css/themes/' . $theme . '/error.css')):?>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/themes/<?php echo $theme ?>/error.css" type="text/css" />
<?php endif; ?>
<link href='http://fonts.googleapis.com/css?family=Handlee' rel='stylesheet' type='text/css'>
</head><body class="page-error">
<div class="error-page-wrap">
<div class="inner"><div class="error-code"><?php if (($this->error->getCode()) == '404') {
header('Location: 404');
exit;
} ?></div><div class="error-message">
</div>
</div>
</div></body>
</html>1 user says Thank You to zorroh for this useful post
Andrew Winkler FriendAndrew Winkler
- Join date:
- September 2014
- Posts:
- 725
- Downloads:
- 206
- Uploads:
- 31
- Thanks:
- 291
- Thanked:
- 34 times in 2 posts
May 22, 2015 at 1:34 am #571440Still doesn’t work.
If I enter this non-existing link:
http:/therebel.is/trythisone
I get that:
http://awesomescreenshot.com/0914x5xy76
If I enter this also non-existing:
http:/therebel.is/news/trythisone
I get that:
http://awesomescreenshot.com/0624x5y3af
What I really would like to get is one of Joomla Art’s funky error pages, like the one with the wise old owl, telling me the exact error number and message or at least something like this page:
-
AuthorPosts
This topic contains 42 replies, has 5 voices, and was last updated by Andrew Winkler 9 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum