[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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
_______________________________________________
TYPO3-dev mailing list
[email protected]
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev