Realurl无法在自己的扩展程序中与多语言一起正常使用

时间:2018-09-11 15:09:14

标签: typo3 extbase realurl

我有一个extbase扩展名,可以显示产品列表并根据过滤器选择生成指向产品的链接。

Realurl的工作原理就像德国的魅力一样,但是当我尝试切换到英语时,出现404错误。

这是真正的url配置:

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
  '_DEFAULT' => 
  array (
    'init' => 
    array (
      'appendMissingSlash' => 'ifNotFile,redirect',
      'emptyUrlReturnValue' => '/',
    ),
    'pagePath' => 
    array (
      'rootpage_id' => '1',
    ),
    'fileName' => 
    array (
      'defaultToHTMLsuffixOnPrev' => 0,
      'acceptHTMLsuffix' => 1,
      'index' => 
      array (
        'print' => 
        array (
          'keyValues' => 
          array (
            'type' => 98,
          ),
        ),
      ),
    ),
    'postVarSets' => 
    array (
      '_DEFAULT' => 
      array (
        'news' => 
        array (
          0 => 
          array (
            'GETvar' => 'tx_news_pi1[news]',
            'lookUpTable' => 
            array (
              'table' => 'tx_news_domain_model_news',
              'id_field' => 'uid',
              'alias_field' => 'title',
              'useUniqueCache' => 1,
              'useUniqueCache_conf' => 
              array (
                'strtolower' => 1,
                'spaceCharacter' => '-',
              ),
            ),
          ),
        ),
        'article' => 
        array (
          0 => 
          array (
            'GETvar' => 'tx_news_pi1[news]',
            'lookUpTable' => 
            array (
              'table' => 'tx_news_domain_model_news',
              'id_field' => 'uid',
              'alias_field' => 'title',
              'addWhereClause' => ' AND NOT deleted',
              'useUniqueCache' => 1,
              'useUniqueCache_conf' => 
              array (
                'strtolower' => 1,
                'spaceCharacter' => '-',
              ),
            ),
          ),
        ),
        'controller' => 
        array (
          0 => 
          array (
            'GETvar' => 'tx_myproductext_product[controller]',
          ),
        ),
        'action' => 
        array (
          0 => 
          array (
            'GETvar' => 'tx_myproductext_product[action]',
          ),
        ),
        'application' => 
        array (
          0 => 
          array (
            'GETvar' => 'tx_myproductext_product[application]',
            'lookUpTable' => 
            array (
              'table' => 'tx_myproductext_domain_model_application',
              'id_field' => 'uid',
              'alias_field' => 'application_name',
              'addWhereClause' => ' AND NOT deleted',
              'useUniqueCache' => 1,
              'useUniqueCache_conf' => 
              array (
                'strtolower' => 1,
                'spaceCharacter' => '-',
              ),
            ),
          ),
        ),
        'product' => 
        array (
          0 => 
          array (
            'GETvar' => 'tx_myproductext_product[product]',
            'lookUpTable' => 
            array (
              'table' => 'tx_myproductext_domain_model_product',
              'id_field' => 'uid',
              'alias_field' => 'product_short_name',
              'addWhereClause' => ' AND NOT deleted',
              'useUniqueCache' => 1,
              'useUniqueCache_conf' => 
              array (
                'strtolower' => 1,
                'spaceCharacter' => '-',
              ),
            ),
          ),
        ),
      ),
    ),
    'fixedPostVars' => 
    array (
      'article' => 
      array (
        0 => 
        array (
          'GETvar' => 'tx_news_pi1[news]',
          'lookUpTable' => 
          array (
            'table' => 'tx_news_domain_model_news',
            'id_field' => 'uid',
            'alias_field' => 'title',
            'addWhereClause' => ' AND NOT deleted',
            'useUniqueCache' => 1,
            'useUniqueCache_conf' => 
            array (
              'strtolower' => 1,
              'spaceCharacter' => '-',
            ),
          ),
        ),
      ),
      117 => 'article',
      147 => 'article',
    ),
    'preVars' => 
    array (
      0 => 
      array (
        'GETvar' => 'no_cache',
        'valueMap' => 
        array (
        ),
        'noMatch' => 'bypass',
      ),
      1 => 
      array (
        'GETvar' => 'L',
        'valueMap' => 
        array (
          'en' => '1',
        ),
        'valueDefault' => 'de',
        'noMatch' => 'bypass',
      ),
      2 => 
      array (
        'GETvar' => 'tx_news_pi1[controller]',
        'valueMap' => 
        array (
        ),
        'valueDefault' => 'News',
        'noMatch' => 'bypass',
      ),
      3 => 
      array (
        'GETvar' => 'tx_news_pi1[action]',
        'valueMap' => 
        array (
        ),
        'valueDefault' => 'detail',
        'noMatch' => 'bypass',
      ),
    ),
  ),
);

我在使用realurl的主页上也遇到了一个错误,在这里我无法将语言切换为英语,因为URL数据中已使用cHashs生成了URL。删除它们后,语言开关再次起作用。我的猜测是,扩展程序中的语言切换也会发生类似的情况。

由于它们和realurl存在问题,如何防止原始URL中的哈希值?

0 个答案:

没有答案