[TYPO3] TYPO3-english Digest, Vol 33, Issue 105

Daniel daniel.rampanelli at gmail.com
Tue Jun 27 14:43:33 CEST 2006


Thank you for the reply, but unfortunately it doesn't help much. If I
apply the procedures described in the link you post, no error page is
shown (the handler registered in
TYPO3_CONF_VARS["FE"]["pageNotFound_handling"] = '...'; is never
called).

The extension error_404_handling works only for apache error
documents, not for typo3 invalid pages, for which I get the error:
Error!

The requested page did not exist or was inaccessible. For this domain
pan.it
no error-page is defined.
Please check the domain-records.

Daniel


On 6/26/06, typo3-english-request at lists.netfielders.de
> Message: 8
> Date: Mon, 26 Jun 2006 07:30:54 -0500
> From: "R. van Twisk" <typo3 at rvt.dds.nl>
> Subject: Re: [TYPO3] 404 page handler extension: error in external php
>         script
> To: TYPO3 English <typo3-english at lists.netfielders.de>
> Message-ID:
>         <mailman.4465.1151325077.30412.typo3-english at lists.netfielders.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Maby this will help?
>
> http://www.rvantwisk.nl/typo3-snippets/page-404-and-301-handling.html
>
> Ries
> > Hi to all,
> >
> > I'm trying to get the 404 page handler extension working, but without
> > success. I've configured all like in the docs, but I still have an
> > annoying problem in the script '404page_not_found.php'.
> >
> > This php-script does only call the pageNotFoundHandler of the current
> > domain. I get the following error:
> >
> > Fatal error: Call to a member function on a non-object in
> > /typo3_src-3.8.0/typo3/sysext/cms/tslib/class.tslib_fe.php on line 413
> >
> > Browsing in the source, I figured out that this problem is caused by
> > the variable $GLOBAL['TYPO3_DB'] not being defined.
> >
> > Here is the (shorted version) source of that script:
> >
> > <snippet>
> > error_reporting (E_ALL ^ E_NOTICE);
> >
> > $TYPO3_MISC['microtime_start'] = microtime();
> > define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':'');
> > define('TYPO3_MODE','FE');
> > define('PATH_thisScript',str_replace('//','/', str_replace('\\','/',
> > php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ?
> > $HTTP_SERVER_VARS['PATH_TRANSLATED']:$HTTP_SERVER_VARS['SCRIPT_FILENAME'])));
> >
> > define('PATH_site', dirname(PATH_thisScript).'/');
> > define('PATH_t3lib', PATH_site.'t3lib/');
> > define('PATH_tslib', PATH_site.'tslib/');
> > define('PATH_typo3conf', PATH_site.'typo3conf/');
> > define('TYPO3_mainDir', 'typo3/');
> >
> >
> >
> > if (!@is_dir(PATH_typo3conf)) die('Cannot find configuration. This
> > file is probably executed from the wrong location.');
> >
> > require_once(PATH_t3lib.'class.t3lib_timetrack.php');
> > $TT = new t3lib_timeTrack;
> > $TT->start();
> > $TT->push('','Script start');
> >
> > require(PATH_t3lib.'class.t3lib_div.php');
> > require(PATH_t3lib.'class.t3lib_extmgm.php');
> > require(PATH_t3lib.'config_default.php');
> >
> > if (!defined ('TYPO3_db'))    die ('The configuration file was not included.');
> >
> > if (!t3lib_extMgm::isLoaded('cms'))   die('<strong>Error:</strong> The
> > main frontend extension "cms" was not loaded. Enable it in the
> > extension manager in the backend.');
> >
> > $CLIENT=t3lib_div::clientInfo();
> >
> > require_once(PATH_tslib.'class.tslib_fe.php');
> > require_once(PATH_t3lib.'class.t3lib_page.php');
> > require_once(PATH_t3lib.'class.t3lib_userauth.php');
> > require_once(PATH_tslib.'class.tslib_feuserauth.php');
> > require_once(PATH_t3lib.'class.t3lib_tstemplate.php');
> > require_once(PATH_t3lib.'class.t3lib_cs.php');
> >
> > $temp_TSFEclassName=t3lib_div::makeInstanceClassName('tslib_fe');
> > $TSFE = new $temp_TSFEclassName(
> >               $TYPO3_CONF_VARS,
> >               t3lib_div::GPvar('id'),
> >               t3lib_div::GPvar('type'),
> >               t3lib_div::GPvar('no_cache'),
> >               t3lib_div::GPvar('cHash'),
> >               t3lib_div::GPvar('jumpurl'),
> >               t3lib_div::GPvar('MP'),
> >               t3lib_div::GPvar('RDCT')
> >       );
> > $TSFE->connectToDB();
> > $TSFE->pageNotFoundHandler ();
> > </snippet>



More information about the TYPO3-english mailing list