使用 extbase 我开发了一个扩展。然后我使用 Realurl 进行 url 重写。
问题是,例如,我执行这个 url:www.mysite.com/records/record-number-one/ 一切都很好,因为“record-number-one”确实存在。
现在如果我尝试
www.mysite.com/records/record-numbbbbbbber-one/
我收到了这个错误
Exception while property mapping at property path "":The identity
property "record-numbbbbbbber-one" is no UID.
但我想被重定向到 404 页面而不是收到此错误!
我试图在我的操作中验证记录并重定向到 404 页面,但是当我收到此错误时,我的代码(在我的操作中)甚至没有执行!
经过大量搜索,有人说如果我设置
plugin.myplugin.mvc.throwPageNotFoundExceptionIfActionCantBeResolved = 1
或者干脆
config.tx_extbase.mvc.throwPageNotFoundExceptionIfActionCantBeResolved = 1
错误将得到解决,我都尝试了,但我仍然得到错误。
有什么帮助吗?
谢谢
PS:我使用 TYPO3 6.1.7