首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TYPO3 8.7.27:段不是postVarSet的关键字

TYPO3 8.7.27:段不是postVarSet的关键字
EN

Stack Overflow用户
提问于 2019-06-25 20:32:12
回答 1查看 624关注 0票数 0

我正在安装一个现有的TYPO3项目。经过多次尝试,我们设法让typo3后端做好了准备。然而,当我访问网站时,我总是收到这个错误消息。这可能与网站的多语言特性和realurl扩展有关。

composer.json (位于根目录/var/www/html/typo3)

代码语言:javascript
复制
{
    "repositories": [{
            "type": "composer",
            "url": "https://composer.typo3.org/"
        },
        {
            "type": "package",
            "package": {
                "name": "Bm/ah-contentapi",
                "version": "0.0.1",
                "type": "typo3-cms-extension",
                "source": {
                    "url": "https://user@bitbucket.org/comp/ah_config_typo3.git",
                    "type": "git",
                    "reference": "master"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "Bm/ah-contentelements",
                "version": "0.0.1",
                "type": "typo3-cms-extension",
                "source": {
                    "url": "https://user@bitbucket.org/comp/ah_contentelements_typo3.git",
                    "type": "git",
                    "reference": "master"
                }
            }
        }
    ],
    "name": "typo3/cms-base-distribution",
    "description": "TYPO3 CMS Base Distribution",
    "license": "GPL-2.0-or-later",
    "require": {
        "helhum/typo3-console": "^4.9.3 || ^5.2",
        "typo3/cms-about": "^8.7.10",
        "typo3/cms-belog": "^8.7.10",
        "typo3/cms-beuser": "^8.7.10",
        "typo3/cms-context-help": "^8.7.10",
        "typo3/cms-documentation": "^8.7.10",
        "typo3/cms-felogin": "^8.7.10",
        "typo3/cms-fluid-styled-content": "^8.7.10",
        "typo3/cms-form": "^8.7.10",
        "typo3/cms-func": "^8.7.10",
        "typo3/cms-impexp": "^8.7.10",
        "typo3/cms-info": "^8.7.10",
        "typo3/cms-info-pagetsconfig": "^8.7.10",
        "typo3/cms-rte-ckeditor": "^8.7.10",
        "typo3/cms-setup": "^8.7.10",
        "typo3/cms-sys-note": "^8.7.10",
        "typo3/cms-t3editor": "^8.7.10",
        "typo3/cms-tstemplate": "^8.7.10",
        "typo3/cms-viewpage": "^8.7.10",
        "typo3/cms-wizard-crpages": "^8.7.10",
        "typo3/cms-wizard-sortpages": "^8.7.10",
        "typo3/cms": "^8.7",
        "dmitryd/typo3-realurl": "2.*",
        "GridElementsTeam/Gridelements": "8.2.*",
        "clickstorm/cs_seo": "3.*",
        "Bm/ah-contentapi": "0.0.1",
        "Bm/ah-contentelements": "0.0.1"
    },
    "scripts": {
        "typo3-cms-scripts": [
            "typo3cms install:fixfolderstructure",
            "typo3cms install:generatepackagestates"
        ],
        "post-autoload-dump": [
            "@typo3-cms-scripts"
        ]
    },
    "extra": {
        "typo3/cms": {
            "web-dir": "public"
        },
        "helhum/typo3-console": {
            "comment": "This option is not needed ay more for helhum/typo3-console 5.x",
            "install-extension-dummy": false
        }
    },
    "autoload": {
        "psr-4": {
            "Bm\\AhContentelements\\": "public/typo3conf/ext/ah_contentelements/Classes",
            "Bm\\AhContentapi\\": "public/typo3conf/ext/ah_contentapi/Classes"
        }
    }
}

位置: /var/www/html/typo3/public/typo3conf/ext/ah_contentapi的realurl_autoconf.php

代码语言:javascript
复制
<?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' => 0,
                'index' =>
                    array(
                        'print' =>
                            array(
                                'keyValues' =>
                                    array(
                                        'type' => 98,
                                    ),
                            ),
                    ),
            ),
        'postVarSets' => array(
            '_DEFAULT' => array(
                'api' => array(
                    array(
                        'GETvar' => 'tx_ahcontentapi_api[type]',
                        'valueMap' => array(
                            'json' => 'json',
                        ),
                    ),
                    array(
                        'GETvar' => 'tx_ahcontentapi_api[controller]',
                        'valueMap' => array(
                            'pages' => 'Pages',
                        ),
                    ),
                    array(
                        'GETvar' => 'tx_ahcontentapi_api[action]',
                    ),
                    array(
                        'GETvar' => 'tx_ahcontentapi_api[uid]'
                    ),
                ),
            ),
        ),
    ),
);

realurl扩展名conf:

EN

回答 1

Stack Overflow用户

发布于 2019-06-26 13:13:45

因为您有多个realurl文件,所以知道使用了哪个文件是很重要的。

在TYPO3 BackEnd中,转到扩展管理器模块,(1)筛选“realurl”(2),然后输入扩展的配置(3)。

然后查看配置:

在第一个字段(Path to configuration file /basic.configFile (string)中),您可以找到活动文件。

为了获得更好的可读性,你应该在Automatic configuration file format/ basic.autoConfFormat (options)字段中选择"PHP source (slow)“(它不是很慢)。

请显示活动的realurl配置文件。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56754149

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档