自TYPO3 9.5.18以来的路由增强器错误

自TYPO3 9.5.18以来的路由增强器错误,typo3,typo3-9.x,Typo3,Typo3 9.x,在Type3 9.5.17之前,以下路径增强器起作用: keywords: limitToPages: - 3735 type: Plugin routePath: '/{uid}' namespace: tx_plkeywords_pi1 requirements: uid: '[0-9]{1,3}' aspects: uid: type: PersistedAliasMapper tableName: tx_plkeyw

在Type3 9.5.17之前,以下路径增强器起作用:

keywords:
  limitToPages:
    - 3735
  type: Plugin
  routePath: '/{uid}'
  namespace: tx_plkeywords_pi1
  requirements:
    uid: '[0-9]{1,3}'
  aspects:
    uid:
      type: PersistedAliasMapper
      tableName: tx_plkeywords_keywords
      routeFieldName: slug
URL如下所示:

https://mydomain.de/mypage/?tx_plkeywords_pi1%5Buid%5D=376&cHash=385abdf54fe3c2617c617af32e5a5c1c
错误消息:

路由“enhancer_tx_plkeywords_PI100000002142B431000000022F8B3C9”的参数“tx_plkeywords_pi1_uid”必须匹配“[0-9]{1,3}”(“给定视频营销”)以生成相应的URL

该表存在,uid为376的条目在Slug字段中有条目“videomarketing”。我不明白这个密码怎么了

谢谢你的帮助!
Peter

您正在检查slug字段
routeFieldName:slug
,这里是“视频营销”的来源。另一方面,使用
[0-9]{1,3}
将slug限制为数字

问题是,你想要你的鼻涕虫做什么

  • 如果希望显示UID,则不需要
    aspects
    部分,因为UID仍然在URL中给出
  • 如果要使用
    slug
    ,则需要从
    uid
    中删除要求。也许您应该将变量重命名为“keyword”,因为“uid”具有误导性

  • 您正在检查slug字段
    routeFieldName:slug
    ,这里是“视频营销”的来源。另一方面,使用
    [0-9]{1,3}
    将slug限制为数字

    问题是,你想要你的鼻涕虫做什么

  • 如果希望显示UID,则不需要
    aspects
    部分,因为UID仍然在URL中给出
  • 如果要使用
    slug
    ,则需要从
    uid
    中删除要求。也许您应该将变量重命名为“keyword”,因为“uid”具有误导性