Typo3 使用RealURL处理可以为空的参数

Typo3 使用RealURL处理可以为空的参数,typo3,typo3-8.x,realurl,Typo3,Typo3 8.x,Realurl,我有一个生成的路径,其中包含不同的类别和产品,并有自己的扩展。可以有一个、两个或三个类别,再加上第二个或第三个类别以下的产品 应该工作的URL示例: /mainCategory/ /mainCategory/secondCategory/ /mainCategory/secondCategory/product-title /mainCategory/secondCategory/thirdCategory/ /mainCategory/secondCategory/thirdCategory/

我有一个生成的路径,其中包含不同的类别和产品,并有自己的扩展。可以有一个、两个或三个类别,再加上第二个或第三个类别以下的产品

应该工作的URL示例:

/mainCategory/
/mainCategory/secondCategory/
/mainCategory/secondCategory/product-title
/mainCategory/secondCategory/thirdCategory/
/mainCategory/secondCategory/thirdCategory/product-title
现在的问题是展示产品不需要第三个类别。
我的配置:

'fixedPostVars' =>
    [
        'produkt' =>
            [
                0 =>
                     [
                          'GETvar' => 'tx_vendor_plugin[mainCategory]',
                           'lookUpTable' =>
                               [
                                   'table' => 'sys_category',
                                   'id_field' => 'uid',
                                   'alias_field' => 'title',
                                   'languageGetVar' => 'L',
                                   'languageField' => 'sys_language_uid',
                                   'transOrigPointerField' => 'l10n_parent',
                                   'useUniqueCache' => 1,
                                   'useUniqueCache_conf' =>
                                       [
                                           'strtolower' => 1,
                                           'spaceCharacter' => '-',
                                       ],
                                    ],
                            ],
                        1 =>
                            [
                                'GETvar' => 'tx_vendor_plugin[subCategory]',
                                'lookUpTable' =>
                                    [
                                        'table' => 'sys_category',
                                        'id_field' => 'uid',
                                        'alias_field' => 'title',
                                        'languageGetVar' => 'L',
                                        'languageField' => 'sys_language_uid',
                                        'transOrigPointerField' => 'l10n_parent',
                                        'useUniqueCache' => 1,
                                        'useUniqueCache_conf' =>
                                            [
                                                'strtolower' => 1,
                                                'spaceCharacter' => '-',
                                            ],
                                    ],
                            ],
                        2 =>
                            [
                                'GETvar' => 'tx_vendor_plugin[thirdCategory]',
                                'lookUpTable' =>
                                    [
                                        'table' => 'sys_category',
                                        'id_field' => 'uid',
                                        'alias_field' => 'title',
                                        'languageGetVar' => 'L',
                                        'languageField' => 'sys_language_uid',
                                        'transOrigPointerField' => 'l10n_parent',
                                        'useUniqueCache' => 1,
                                        'useUniqueCache_conf' =>
                                            [
                                                'strtolower' => 1,
                                                'spaceCharacter' => '-',
                                            ],
                                    ],
                            ],
                        3 =>
                            [
                                'GETvar' => 'tx_vndor_plugin[product]',
                                'lookUpTable' =>
                                    [
                                        'table' => 'tx_vendor_domain_model_product',
                                        'id_field' => 'uid',
                                        'alias_field' => 'title',
                                        'languageGetVar' => 'L',
                                        'languageField' => 'sys_language_uid',
                                        'transOrigPointerField' => 'l10n_parent',
                                        'useUniqueCache' => 1,
                                        'useUniqueCache_conf' =>
                                            [
                                                'strtolower' => 1,
                                                'spaceCharacter' => '-',
                                            ],
                                    ],
                            ],
                    ],
当我将
noMatch=>bypass
添加到第三个类别时,它不会显示任何第三个类别。无法访问每三个类别

当我在没有
noMatch=>旁路的情况下使用它时,对于没有第三个类别的产品,URL中有一个空路径参数:
/maincegory/secondCategory//product title

谁能帮我做这件事?

这是不久前在排版3中提出的问题:

换句话说:你可以;在postVar的开头或中间没有可选参数

因此,结论是,这是不可能的RealURL

例如:

/mainCategory/secondCategory/product-title/
/mainCategory/secondCategory/thirdCategory/

RealURL应该如何知道在这里解码
产品标题
第三类
?这是不明确的,因为它可能是一个产品或一个类别。这就是为什么RealURL在开始/中间使用空路径段的原因。

谢谢。如果我使用空路径方法,它会给我一个在FE中找不到的
文件。对此我能做些什么?这条信息来自哪里?Apache/TYPO3/Other?不知道。它看起来像一个回声,后面是一个骰子。没有例外。然后尝试
grep
您的代码。如果您使用PHP-FPM或您的代理,它也很可能是来自PHP-FPM或您的代理的消息。