Question

With extbase i developped an extension. And then i use Realurl for url rewriting.

The problem is, for example, i execute this url : www.mysite.com/records/record-number-one/ Everything is ok since the "record-number-one" does exist.

Now if i try

www.mysite.com/records/record-numbbbbbbber-one/

I got this error

Exception while property mapping at property path "":The identity
property "record-numbbbbbbber-one" is no UID.

But i want to be redirected to the 404 page instead of getting this error!

I tried to validate the record in my action and redirect to the 404 page, but when i got this error, my code (in my action) is not even executed!

After a lot of searches, some people say that if i set

plugin.myplugin.mvc.throwPageNotFoundExceptionIfActionCantBeResolved = 1

Or simply

config.tx_extbase.mvc.throwPageNotFoundExceptionIfActionCantBeResolved = 1

The error will be solved, i tried both and i still got the error.

any help ?

Thanks

PS: i use TYPO3 6.1.7

Was it helpful?

Solution 2

In your action you need to declare the parameter with @dontvalidate.

OTHER TIPS

Fix this in realurl config by adding 'enable404forInvalidAlias' => 1

e.g.:

'lookUpTable' => array(
'table' => 'tx_example_domain_model_example',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted AND NOT hidden',
'enable404forInvalidAlias' => 1,
),
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top