[TYPO3-dev] Hidden news records cause exception with realURL

Helmut Hummel helmut.hummel at typo3.org
Wed Jul 2 10:56:32 CEST 2014


Hi Bernd!

On 01.07.14 14:08, Bernd Schönbach wrote:

> I have news records which get nicely formatted URLs with realURL.
> If I hide a news record I want TYPO3 to show the 404 page, if the old
> URL of the hidden record is called. Instead it throws an exception:
>
> #1297759968: Exception while property mapping at property path "":Object
> with identity "123" not found

This has nothing to do with realurl, but is the standard behaviour of 
Extbase/ the Property Mapper when no (visible) news/object is found.

The only way to get a 404 is to create your own exception handler class 
which implements a special case for this exception, which then calls

$GLOBALS['TSFE']->pageNotFoundAndExit($exception->getMessage());

And then use this exception handler in your configuration.

If you need more help with that, let me know.

Kind regards,
Helmut

-- 
Helmut Hummel
Release Manager TYPO3 6.0
TYPO3 Core Developer, TYPO3 Security Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org



More information about the TYPO3-dev mailing list